Hello All,
Below is AFL has options to plot white lines 0.2% or 0.3% above/below previous day's High/Low.
I tried put in my best efforts to create the exploration which can extract the stocks crossing these levels. I studied many AFL exploration formulae and searched net. But nothing worked.
The result of the exploration' I have attached it as an image.
Please help me build this exploration.
***********************************
_SECTION_BEGIN("");
dH1= TimeFrameGetPrice("H",inDaily,-1);
dL1= TimeFrameGetPrice("L",inDaily,-1);
yrng=(dH1-dL1);
rrp=Optimize("room%",Param("room%",0.2,0.3),1,0.2,0.3);
room=(yrng*rrp)/100;
today=Day()==LastValue(Day());
Plot(IIf(today,dh1+room,Null),"",colorLightYellow,styleDashed,8);
Plot(IIf(today,dl1-room,Null),"",colorLightYellow,styleDashed,8);
Buy = room > dH1;
Sell = room < dL1;
Filter = (dH1 > 0) OR (dL1 > 0);
SetOption("NoDefaultColumns", True);
AddColumn(DateTime(), "DATE", formatDateTime,colorDefault, colorDefault, 80);
AddTextColumn(Name(), "SYMBOL", 77);
AddColumn(IIf(dH1, 48 + dH1, 32), "BUY", formatChar, colorYellow, IIf(dH1, colorLightBlue, colorDefault));
AddColumn(IIf(dL1, 48 + dL1, 32), "SELL", formatChar, colorYellow, IIf(dL1, colorBlue, colorDefault));
_SECTION_END();
***************************
Below is AFL has options to plot white lines 0.2% or 0.3% above/below previous day's High/Low.
I tried put in my best efforts to create the exploration which can extract the stocks crossing these levels. I studied many AFL exploration formulae and searched net. But nothing worked.
The result of the exploration' I have attached it as an image.
Please help me build this exploration.
***********************************
_SECTION_BEGIN("");
dH1= TimeFrameGetPrice("H",inDaily,-1);
dL1= TimeFrameGetPrice("L",inDaily,-1);
yrng=(dH1-dL1);
rrp=Optimize("room%",Param("room%",0.2,0.3),1,0.2,0.3);
room=(yrng*rrp)/100;
today=Day()==LastValue(Day());
Plot(IIf(today,dh1+room,Null),"",colorLightYellow,styleDashed,8);
Plot(IIf(today,dl1-room,Null),"",colorLightYellow,styleDashed,8);
Buy = room > dH1;
Sell = room < dL1;
Filter = (dH1 > 0) OR (dL1 > 0);
SetOption("NoDefaultColumns", True);
AddColumn(DateTime(), "DATE", formatDateTime,colorDefault, colorDefault, 80);
AddTextColumn(Name(), "SYMBOL", 77);
AddColumn(IIf(dH1, 48 + dH1, 32), "BUY", formatChar, colorYellow, IIf(dH1, colorLightBlue, colorDefault));
AddColumn(IIf(dL1, 48 + dL1, 32), "SELL", formatChar, colorYellow, IIf(dL1, colorBlue, colorDefault));
_SECTION_END();
***************************
Last edited: