Need AFL for My Strategy

#1
Dear Friends and experts create AFL for my strategy given below :

-------------------------------


* Take any time frame 1'st candle's open,high,close .,

OPEN = A
HIGH = B
CLOSE = C

D = B-A.,
E = A-C.,

IF D is LESS than E : then plot lines as follows

plot line for A+(B-A)+10 ( ie., " F " )
Plot line for A-(B-A)-10 ( ie ., " G " )
plot line for F-12 ( ie ., " H " )
plot line for F+21 ( ie ., " I " )
plot line for G+12 ( ie ., " J " )
plot line for G-21 (ie., "K" )

or


IF D is GREATER OR EQUAL to E : then plot lines as follows

plot line for I-( I*0.45% ) ( ie., " L " )
plot line for K+( k*0.25% ) ( ie ., "M" )
plot line for L-12
plot line for M+20
plot line for M+12
plot line for M-20



Thanks in advance ...

:thumb:
 
#4
Look for opening range breakout code / AFL . . . you will find 100s of examples online, even here on TJ

anyway here's basic idea to plot OHLC of the opening bar, you can take forward from there . . .

Code:
_SECTION_BEGIN("ORB");
FB   = DateNum() != Ref(DateNum(),-1);
Bars = 1 + BarsSince(FB);

Op  =  ValueWhen(FB,O);
Hi  =  ValueWhen(FB,H);
Lo  =  ValueWhen(FB,L);
Cl  =  ValueWhen(FB,C);

Plot(Op, "",colorDarkGreen,styleDashed|styleNoLabel);
Plot(Hi, "",colorBlueGrey,styleDashed|styleNoLabel);
Plot(Lo, "",colorLime,styleDashed|styleNoLabel);
Plot(Cl, "",colorBrightGreen,styleDashed|styleNoLabel);
_SECTION_END();
 
#5
Look for opening range breakout code / AFL . . . you will find 100s of examples online, even here on TJ

anyway here's basic idea to plot OHLC of the opening bar, you can take forward from there . . .

Code:
_SECTION_BEGIN("ORB");
FB   = DateNum() != Ref(DateNum(),-1);
Bars = 1 + BarsSince(FB);

Op  =  ValueWhen(FB,O);
Hi  =  ValueWhen(FB,H);
Lo  =  ValueWhen(FB,L);
Cl  =  ValueWhen(FB,C);

Plot(Op, "",colorDarkGreen,styleDashed|styleNoLabel);
Plot(Hi, "",colorBlueGrey,styleDashed|styleNoLabel);
Plot(Lo, "",colorLime,styleDashed|styleNoLabel);
Plot(Cl, "",colorBrightGreen,styleDashed|styleNoLabel);
_SECTION_END();


Thank u sir ... Thnx for ur initial help .... but i dont know coding so im expecting complete code let me wait for expert to help my strategy ... Thank u very much sir .. :thumb:
 
#8
Hai TS ....

Sure sir ll share the details for using it ... but before that i have to optimize and study it after receiving the code from our friends and experts .... IM WAITING FOR CODE HELP :thumb:
But I feel it can be used, without waiting for code, as no one is here to provide the code.
Thats why asked for it.
Thanks
 
#9
Dear Friends and experts create AFL for my strategy given below :

-------------------------------


* Take any time frame 1'st candle's open,high,close .,

OPEN = A
HIGH = B
CLOSE = C

D = B-A.,
E = A-C.,

IF D is LESS than E : then plot lines as follows

plot line for A+(B-A)+10 ( ie., " F " )
Plot line for A-(B-A)-10 ( ie ., " G " )
plot line for F-12 ( ie ., " H " )
plot line for F+21 ( ie ., " I " )
plot line for G+12 ( ie ., " J " )
plot line for G-21 (ie., "K" )

or


IF D is GREATER OR EQUAL to E : then plot lines as follows

plot line for I-( I*0.45% ) ( ie., " L " )
plot line for K+( k*0.25% ) ( ie ., "M" )
plot line for L-12
plot line for M+20
plot line for M+12
plot line for M-20



Thanks in advance ...

:thumb:
So Sad... no one here to help ?????????????? :(:(:(
 
#10
Dear Friends and experts create AFL for my strategy given below :

-------------------------------


* Take any time frame 1'st candle's open,high,close .,

OPEN = A
HIGH = B
CLOSE = C

D = B-A.,
E = A-C.,

IF D is LESS than E : then plot lines as follows

plot line for A+(B-A)+10 ( ie., " F " )
Plot line for A-(B-A)-10 ( ie ., " G " )
plot line for F-12 ( ie ., " H " )
plot line for F+21 ( ie ., " I " )
plot line for G+12 ( ie ., " J " )
plot line for G-21 (ie., "K" )

or


IF D is GREATER OR EQUAL to E : then plot lines as follows

plot line for I-( I*0.45% ) ( ie., " L " )
plot line for K+( k*0.25% ) ( ie ., "M" )
plot line for L-12
plot line for M+20
plot line for M+12
plot line for M-20



Thanks in advance ...

:thumb:

So sad ... No one is ready to help me ... :(:(:confused::confused:
 

Similar threads