how to set chart timeframe ?

megapixel

Well-Known Member
#1
I want to run a AFL on 5 minute chart. How to set timeframe in AFL ?

I'm not sure but there should be something like this ... .just a wild guess.

setChartTimeFrame(5min);
Buy = Cross(MA(C, 20), MA(C,50));
..........................
..........................


Can anyone please tell what to look at to set chart timeframe in AFL ?
 
Last edited:

Raju

Well-Known Member
#4
Following AFL could help in understanding Time Frame

_SECTION_BEGIN("TF Study ");

Period= ParamList("Base","5Minute|1Minute",0);

if(Period=="5Minute")

{TimeFrameSet(in5Minute);
PlotOHLC(Open, High, Low, Close, "5 Mins Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}

if(Period=="1Minute")

{TimeFrameSet(in1Minute);
PlotOHLC(Open, High, Low, Close, "1 Mins Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}

_SECTION_END();
 

Similar threads