Hi GAMMA,
Sorry I didn’t answer your request. Oil is on my watchlist, NG not. I did play around with oil and I think it could work but not with full attention. At the moment I invest my limited time to sort out the errors in life trading.
best, Reiner
ALEModerator
Master
Hello Reiner,
no problem, you are a kind person, you are doing so much for the whole community, the code is the best..and it become more and more perfect! Thanks for your hard work
In my strategies ther is the trailing stop of Kenneth, If it can help you.
// TRAILING STOP LOGIK
TGL =130
TGS= 100
if not onmarket then
MAXPRICE = 0
MINPRICE = close
EXITPRICE = 0
ENDIF
if longonmarket then
MAXPRICE = MAX(MAXPRICE,close)
if MAXPRICE-tradeprice(1)>=TGL*pointsize then
EXITPRICE = MAXPRICE-TGL*pointsize
ENDIF
ENDIF
if shortonmarket then
MINPRICE = MIN(MINPRICE,close)
if tradeprice(1)-MINPRICE>=TGS*pointsize then
EXITPRICE = MINPRICE+TGS*pointsize
ENDIF
ENDIF
if onmarket and EXITPRICE>0 then
EXITSHORT AT EXITPRICE STOP
SELL AT EXITPRICE STOP
THANK YOU VERY VERY MUCH
Hi Reiner, great work on the latest edition. I started V6B1 live at lunch time on the 9th to test it. The system took a live position long @ 10653.5 @ 20:00 UK Time on the 9th. This went up by 149 points to a profit of around £450. The trailing stop did not activate, is this the same issue you are experiencing? This trade close at 12:00PM today for +13 points.
P.S The backtest is still running and has not closed the second position for some reason.
Hi Cosmic1,
The trade was OK. V6 bought first position at 10.653,5 with take profit 3,25% (11.000) or 2% (10.867) trailing stop. None of both levels has been reached and max holding check sold after 9 candles – everything as expected.
I reduced maxCandlesLongWithProfit in V6 with the idea behind that Pathfinder is latest after 9 candles 2% in front and with start of trailing mechanism the max holding check will extend to 16 candles or the system closed the position because there isn’t a trend.
I will verify V6 trailing mechanism in life trading next week.
best, Reiner
Thanks Reiner, makes perfect sense now.
Is there any reason the backtest still didn’t close, is this the same for you?
Hi Reiner, apologies for my late reply. I just realised what I’ve done and it is as you said! I’ll amend now and I’m sure it will be fine.
Thank you for all your help.
J.
arkeParticipant
Average
Hi Reiner,
I didn’t Change anything, just took the original code and backtested it on these two Dates…
Regarding the stop loss issue:
Did you check your account activity history for an order? Maybe the order was rejected because of the minimum distance to the actual Price.
The probability for that is not really high, but out of the code it would be possible that the stop is set to the actual pricelevel:
<pre class=”line-numbers”><code class=”language-prorealtime”>IF newSL > 0 AND close – newSL >= trailingStepLongInPoints * pipsize THEN
newSL = newSL + trailingStepLongInPoints * pipsize
ENDIF
It’s also dangerous to set “stopLoss = 0” while the trailling mechinism isn’t working. Because of that the stop will be removed.
Arke
Hi Arke,
Thanks for your feedback. Your analysis is correct, set stoppLoss = 0 is responsible for the stop order deletion. I saw this behavior on my life trading tests as well. I will change this.
best, Reiner
Hi Reiner,
I was wondering if Bund could be suitable for Pathfinder. Just a thought!
Thanks,
Mikael
MarkParticipant
Senior
Hi guys,
How do i calculate what point size to use given my account size?
Mark
rebParticipant
Master
Hi Mark
I would say 1 mini for 1k eur capital
With Pathfinder, you may take 15 mini , so I would use 15k eur for 1 mini (or at least 10k eur)
At this stage I don’t have these 10k , that’s why I don’t trade Pathfinder
Reb
MarkParticipant
Senior
Hi Reb,
Thank you for your reply, are you sure that is correct? i haven’t seen losses of that amount (10k) on any of the back testing.
Mark
rebParticipant
Master
Hi Mark
I gave you an idea to use Pathfinder with few risk. It is not the max historical drawdown.
In term of dd, 2k capital is sufficient to trade with pathfinder but what will you do if if you loose 80% of it at the beginning ?
FYI,
Hi nyborjare, to work with pathfinder DAX strategy account value should be at least 8/9000 € in my opinion In general to know account value to run strategies , you can multiply maxdrwadown of the strategy x 5 at least For example : MAXDRAWDOWN= € 1850 THEN ( € 1850 X 5) ACCOUNT VALUE = €9250
@Reiner
Answering to your question (a bit late..) about combining the trailing stop function and the SET STOP instruction, I confirm you that this kind of code:
SELL AT newSL STOP
// superordinate stop and take profit
SET STOP %LOSS stopLoss
SET TARGET %PROFIT takeProfit
is accepted by IG server and should work as intended.
short (I was told later this year) IG introduces the ProRealTime version 10.3 platform. Will be consequences? someone has already done testing on 10.3?