Please write an AFL for EOD Stop and Reverse value to be used for the next day

sudris

Well-Known Member
#3
Hi Carnot11,

Below is your code.

Code:
SetChartOptions(0,chartShowArrows|chartShowDates);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

TimeFrameSet(inDaily);

ls9=MA(L,9);

MySAR=L-(H-Ref(H,-1));

//MySAR=ls9+(L-ls9)-(H-Ref(H,-1));

TimeFrameRestore();

Plot(TimeFrameExpand(MySAR,inDaily,expandFirst),"MySAR",ParamColor("MySAR",6));
 

carnot11

Active Member
#4
Hi Carnot11,

Below is your code.

Code:
SetChartOptions(0,chartShowArrows|chartShowDates);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

TimeFrameSet(inDaily);

ls9=MA(L,9);

MySAR=L-(H-Ref(H,-1));

//MySAR=ls9+(L-ls9)-(H-Ref(H,-1));

TimeFrameRestore();

Plot(TimeFrameExpand(MySAR,inDaily,expandFirst),"MySAR",ParamColor("MySAR",6));
Dear Sirji,

Thank you very much.

Appreciate your help and efforts.

Thanks again.

Enjoy,
CArnot11 :)
 

Similar threads