Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 715 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
multi frameindicator #471576
03/10/18 12:16
03/10/18 12:16
Joined: Mar 2018
Posts: 8
S
sergentGarcia Offline OP
Newbie
sergentGarcia  Offline OP
Newbie
S

Joined: Mar 2018
Posts: 8
Hello
I'm trying to use different timeframe with ichimoku.
I'd like have ichimoku in timeframe daily in 1 minutes trading
this is my script

Code:
void run()
{
	set(LOGFILE|PLOTNOW);
	set(TICKS);

	BarPeriod = 60;
	TimeFrame = 24;

	 vars H = series(priceHigh()), 
    L = series(priceLow()),
    O = series(priceOpen()),
    C = series(priceClose());
	 var Kijun = (MaxVal(H,26)+MinVal(L,26))/2;
	
	BarPeriod = 1;
	TimeFrame = 1;
	
	NumYears = 1;
	StartDate = 20180201;
	
	PlotScale = 8;
	PlotWidth = 1200;
	PlotHeight1 = 800;
	PlotHeight2 = 600;
	PlotDate = 20180201; 
	PlotBars = 2000;

	
	Ichimoku();
	plot("Kijun",Kijun,MAIN|LINE,BLUE);	
}



I chekeck with fxcm chart and kijun value is not good.
if i remove the two lines
Code:
BarPeriod = 1;
	TimeFrame = 1;


thekijun value is the same as fxcm charts.
Thank you

Re: multi frameindicator [Re: sergentGarcia] #471594
03/10/18 17:59
03/10/18 17:59
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Ciao, Only one Barperiod allowed, but you can set several timeframe.
Try setting BarPeriod =1 and than set TimeFrame to 60 adjusting the code accordingly.

HtH

Re: multi frameindicator [Re: MatPed] #471596
03/10/18 18:28
03/10/18 18:28
Joined: Mar 2018
Posts: 8
S
sergentGarcia Offline OP
Newbie
sergentGarcia  Offline OP
Newbie
S

Joined: Mar 2018
Posts: 8
thank you for your answer
i 've modified my script but the kijun value isn't the same as in fxcm charts.
I'd like to have the kijun daily in a 1 miniute trading.
So i've tried change timeframe to 1440(ie one day) and display it in a 1 muinute charte
what did i do wrong ?


Quote:


void run()
{
set(LOGFILE|PLOTNOW);
set(TICKS);


BarPeriod = 1;
TimeFrame = 1440;
frameSync(24);
vars H = series(priceHigh()),
L = series(priceLow()),
O = series(priceOpen()),
C = series(priceClose());
var Kijun = (MaxVal(H,26)+MinVal(L,26))/2;

TimeFrame = 1;
NumYears = 1;
StartDate = 20180201;

PlotScale = 8;
PlotWidth = 1200;
PlotHeight1 = 800;
PlotHeight2 = 600;
PlotDate = 20180201;
PlotBars = 2000;


Ichimoku();
plot("Kijun",Kijun,MAIN|LINE,BLUE);
}





Last edited by sergentGarcia; 03/10/18 18:29.
Re: multi frameindicator [Re: sergentGarcia] #471902
03/24/18 16:25
03/24/18 16:25
Joined: Jun 2017
Posts: 78
B
BobbyT Offline
Junior Member
BobbyT  Offline
Junior Member
B

Joined: Jun 2017
Posts: 78
I could be wrong on this but try replacing:
Code:
TimeFrame = 1440;
frameSync(24);

with just:
Code:
TimeFrame = frameSync(1440);



I think as your code as is, is syncing the D1 to change frame every 24 days. This is because you have already set TimeFrame to D1.

Also, this is more flexible when setting timeframes as it is always relative to BarPeriod:
Code:
TimeFrame = x/BarPeriod

where x is whatever timeframe you want to use in minutes.

Cheers


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1