How to Plot OI chart

bt_mkt

Active Member
#1
Afl reference

Hello Freinds
Iam trying to put my trading system into AFL format ,,,
need help in AFL language

1) i need to draw a horizontal line basing on some calcilations ,,, for evey day the line will be different( vlaue will cahnge every day)
i tried using Plot(4735,"CL",colorBlue,styleThick);
but its drawing on prevoius day charts also
actualy it(line) should display only for that day
 
#2
Re: Afl reference

Hello Freinds
Iam trying to put my trading system into AFL format ,,,
need help in AFL language

1) i need to draw a horizontal line basing on some calcilations ,,, for evey day the line will be different( vlaue will cahnge every day)
i tried using Plot(4735,"CL",colorBlue,styleThick);
but its drawing on prevoius day charts also
actualy it(line) should display only for that day
yes this will plot a horr line at 4735 across whole chart. Instead u can try the following
Plot(P,"CL",colorBlue,styleThick);

where P is a variable and its value changes as per ur logic.
 
#5
Re: Afl reference

how can i get the position of the first bar of intraday chart
Code:
Day_ = Day();
Month_ = Month();
daystart = Day_ - Ref(Day_,-1) || Month_ - Ref(Month_, -1);

if(Interval() >= 86400) //don't plot in 'Daily' timeframe 
  daystart = 0;

Plot(daystart, "", ParamColor("Color Daily Start", colorBlue), styleHistogram | styleThick | styleOwnScale, 0, 1, 0, -1);
 
Last edited:

bt_mkt

Active Member
#6
AFL help >> to draw only current day;s graph

i like to view only todays graph (using intra 5 min chart mode);
how can i code using AFL ,,
with bit going thru AFL referece , i came up with some code ,, I want to know wether its corect code or not??

qd = LastValue(DateNum(),1);
//td = Now(3);
td = Now(3);

if(qd == td) {
Plot(C,"CLOSE",colorBlue,styleLine);
}
 
Last edited:
#9
Re: How to plot only current days graph

Code:
Day_        = DayOfYear();
GraphXSpace = Param("GraphXSpace", 0, -50, 100, 1);
_N(Title    = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
SetChartOptions(0, chartShowArrows|chartShowDates);
Plot(IIf(Now(10) == Day_, Close, Null), "", ParamColor("Color Outline", colorGrey40 ), styleNoTitle | ParamStyle("Style Price") | GetPriceStyle() );
 

Similar threads