Stanton got this working
e= Highest[DC](high)
f=Lowest[DC](low)
by doing this
DEFPARAM CumulateOrders = false
If NOTONMARKET Then
DC=20// period of Donchian Stop
Endif
IF LONGONMARKET THEN
DC=20// period of Donchian Stop
TGL=5//Trailing Stop pip distance
TP=30//take profit
//SL=50// stop loss
ELSIF SHORTONMARKET THEN
DC=20// period of Donchian Stop
TGS=5
TP=30
//SL=50
ENDIF
ALEModerator
Master
ok I’ve already posted code with first the first correction of stanton:
Updated the code like this. Just assigned a default value to the variables. can be overwritten if long or short.
DEFPARAM CumulateOrders = false
DC=20
TGL=5
TGS=5
TP=30
IF LONGONMARKET THEN
DC=20
TGL=5
TP=30
ELSIF SHORTONMARKET THEN
DC=20
TGS=5
TP=30
ENDIF
This one really looks promising. Nice work Ale! But i wonder which are the latest versions of the different files. There are so many versions on the last pages, it is little confusing.
I’m just running a WF-test on FBS_EURUSD_30M_V2 (i hope this wasnt the wrong version).
What do you guys who set this life use for values for CP and TP?
Will of course share my WF-result (if the PC doesnt crash LOL).
ALEModerator
Master
Hello despair
the first page is updated with latest version
6o minute version entered long trade at 18:00 South Africa Time. @ 1,0965
Stoploss moved to break even at 19:00 . So far so good.
Got stopped out at – 10 cents now its climbing.
Considering increasing trailing stop to 10.
ALEModerator
Master
@stanton
i thought to optimize last 5 year, but not finish yet but seem that 1H eurusd work well with:
cp 104
tgl 9
tgs 11
i let you know finish test tomorrow
Hi Ale
You said … first page is updated with latest version … this is very useful.
Might we have latest v3 & v4 on the first page / post also please?
Many Thanks
GraHal
Hi guys, I’ve started a rough version on AUDUSD 30M. Had to ad an ADX filter for it to work better.
ALEModerator
Master
Hello Victor,
good Idea to move to others take profit and trailing stop, could you explain me trailing stop logik..?
Thanks
Ale
Sorry guys, the comment I wrote on the trailing start doesn’t seem to be completely valid. But there is a reason behind it. I added the comment because when I’d a look earlier at the minimum stop distance for this pair it was set to 6 pips, but in my WF testing I got a suggested result of like 2 or 3, and if I would put on a trailing stop starting so tight there would not be enough space for the price to move because we need to keep in mind that the first break even level is set our entry level + the value of TGS. (Btw the 100 000 bars backtest result is better with TGL = 3 and TGS = 1 but I’m not sure if it works in reality and when the minimum stop distans gets increased like it must have been when I first checked your system will fail)
I suggest also to try the MFE stop from Nicolas (https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/), sometime it’s better than the fixed step trailing one (but not always).
Another thing I’ve been trying which is not yet in this code is a dynamic profit target based on ATR. Especially with forex it helps to adjust the target level after the current volatility of the market.
One issue I’ve been facing with the FX pairs attached to the Asian session is that the time restriction doesn’t work as well as on pairs connected to the European and American session.
Ale has done a great work on the EURUSD and I hope that more people could have a look at other markets in the meantime in order to speed up the development. Start with the lowest spreads and keep on testing different combinations and timeframes!
Cheers and have a great weekend!
ALEModerator
Master
Hello victor
thank you very much for your support
I’m agree with your ideas, I’ve start with Trailing stop =5 because it’s the minimum distance stop for this pair
Eurusd response better then the others, many others market need a fixed stop, filter to entry at market, and dynamic take profit
Tksnks
Ale
Good afternoon Ale ,
First of all congratulations for the excellent TS and the good explanations of that .
My question is, in the previous post you talk about :
@KASPER This is results with 1 lot and risk 0.3
If I use 4 lot ( in EUR/USD mini ) , I reduce the capital to 5000 and I set the risk ..3
What do you Think
Example
Reinvest=1
if reinvest then
Capital = 5000
Risk = 3
StopLoss = 48
equity = Capital + StrategyProfit
maxrisk = round(equity*(Risk/100))
MAXpositionsize=5000
MINpositionsize=4
Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(round((maxrisk/StopLoss)))))
else
Positionsize=4
StopLoss = 48
Endif