NF Swing Trading using Fractal AFL

oldtrader

Well-Known Member
thanks.
result is favourable or not favourable. ?
Comparing this with our standard AFL , the results look favourable. Eventhough the Profit is slightly less than the standard AFL, the number of trades and max drawdown are much better in the current AFL. Maybe with some fine tuning we can still improve it.
 

oldtrader

Well-Known Member
Hi

Since you guys are into testing systems and optimization etc, using SAR type of systems . . .

Using a stop Loss ......

But using Profit Stops wit...

But the profit booking sho...

try this code for range
Code:
//PROFITSTOP
Profit = Optimize("Profit", 500,0,1250,50);
PS = IIf(Buy OR Short,Null,IIf(Flip(Buy,Sell),ValueWhen(Buy,Close)+Profit,ValueWhen(Short,Close)-Profit));
Plot(PS,"",colorLightGrey,styleNoRescale|styleDashed|styleStaircase);
ApplyStop(stopTypeProfit,stopModePoint,Profit);
A word about ..........
Thanks

Happy :)

Hi Happy Singh,

Need your help very badly to run optimization with profit code included. I need a little change in the profit parameters. Instead of the profit range of 0 to 1250 points , I would like to check as percentage of trigger price. I would prefer a percentage range of 0 to 10. Please suggest the necessary changes to the code.

Thinking in percentage wise to accomodate the change in NF rate over a period of time.

Regards,
Oldtrader
 

LOVEENAJYOTHI

Well-Known Member
Hi Happy Singh,

Need your help very badly to run optimization with profit code included. I need a little change in the profit parameters. Instead of the profit range of 0 to 1250 points , I would like to check as percentage of trigger price. I would prefer a percentage range of 0 to 10. Please suggest the necessary changes to the code.

Thinking in percentage wise to accomodate the change in NF rate over a period of time.

Regards,
Oldtrader

Hope the following modification will serve ur purpose, if not, do lemme know.

Code:
//PROFITSTOP
Profit = Optimize("Profit", 1,0.5,10,0.5)*0.01;
PS = IIf(Buy OR Short,Null,IIf(Flip(Buy,Sell),ValueWhen(Buy,Close)*(1+Profit),ValueWhen(Short,Close)*(1-Profit)));
Plot(PS,"PS",colorLightGrey,styleNoRescale|styleDashed|styleStaircase);
ApplyStop(stopTypeProfit,stopModePercent,Profit*100);
I prefer 1 to 10 percent with a step up of 0.5 percent.

If u need 0.01 to 10 percent, plz replace the 1st line with the following line

Code:
Profit = Optimize("Profit", 1,0.01,10,0.01)*0.01;
 
Last edited:

oldtrader

Well-Known Member
Hope the following modification will serve ur purpose, if not, do lemme know.

Code:
//PROFITSTOP
Profit = Optimize("Profit", 1,0.5,10,0.5)*0.01;
PS = IIf(Buy OR Short,Null,IIf(Flip(Buy,Sell),ValueWhen(Buy,Close)*(1+Profit),ValueWhen(Short,Close)*(1-Profit)));
Plot(PS,"PS",colorLightGrey,styleNoRescale|styleDashed|styleStaircase);
ApplyStop(stopTypeProfit,stopModePercent,Profit*100);
I prefer 1 to 10 percent with a step up of 0.5 percent.

If u need 0.01 to 10 percent, plz replace the 1st line with the following line

Code:
Profit = Optimize("Profit", 1,0.01,10,0.01)*0.01;

Please check the code again. I am getting strange results with the above code.



Note . Misread your post and edited the 1st line only. Let me try again .
 
Last edited:

Similar threads