Turin + Italy
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129
|
If it is helpful, I have included in addition to the StopLoss that can be optimized, a ProfitTarget based on volatility (ATR)
and with a percentage retracement, so:
activates the stop (ProfitTarget) if, after the profit of 1.5 times the ATR is reached, the Market goes back 20%.
-----------------------------------------------------
Inputs: Amount(1000);
value1=AvgTrueRange(10);
value2=value1*1.5;
SetStopLoss(Amount);
SetPercentTrailing(value2,20);
---------------------------------------------------------
If you also want to optimize the percentage retracement value, the formula becomes like this:
-----------------------------------------------------
Inputs: Amount(1000), n1(20);
value1=AvgTrueRange(10);
value2=value1*1.5;
SetStopLoss(Amount);
SetPercentTrailing(value2,n1);
---------------------------------------------------------
|