I know that when working on multitime frame we perform operation seperatelty within Timeframeset and Timeframerestore. But how to perform such calculation which stores value of multi-time frame.
Code:
TimeFrameSet(in5Minute); m=MACD(12,26); n=Signal(12,26,9); a= StochK( periods = 14, ksmooth=3 ); b =StochD( periods = 14, Ksmooth=3, Dsmooth=3 ) ; D1= a>b; TimeFrameRestore(); TimeFrameSet(in15Minute); x =StochD( periods = 14, Ksmooth=3, Dsmooth=3 ) ; y= StochK( periods = 14, ksmooth=3 ); m1=MACD(12,26); n1=Signal(12,26,9); C3= m1>n1; TimeFrameRestore(); Z = ((a+x)/2) <40; Buy = D1 AND C3 AND Z; Buy = TimeFrameExpand(D1,in5Minute) AND TimeFrameExpand(C3,in15Minute) and Z;
In abv code a defined at 5min and x at 15min. But for variable z which time frame shoud we use. And how to write z in last two lines? This code doesnt work properly for value of z.