Hello everyone,
I have an issue with trailing stops on GBP/JPY (30m and 1h) that I don’t understand. My orders are being rejected because the stop exceeds the maximum distance. When I go to IGs online platform I am able to execute the same trades without a problem.
I have tried “trailing” and “ptrailing” with the same result.
The same problem occurs on AUD/CAD (1h), where I had a “ptrailing 95” fail. I contacted IG and was told my order sent with a 950,000,000 pip stop.
I’m new to mechanical trading so any help much appreciated. Please see attached code.
Many thanks!
if (myconditions) then
buy PositionSize contract at market
set stop ptrailing 210
endif
IF (myconditions) THEN
BUY PositionSize CONTRACT AT MARKET
set stop ptrailing 95
ENDIF
Try below …
IF (myconditions) THEN
BUY PositionSize CONTRACT AT MARKET
set stop ptrailing 95*pipsize
ENDIF
Seems ok with “trailing”, “ptrailing” produces an undesirable equity curve!
Thanks for the quick reply GraHal, I’ll report back next time I get a signal.
“ptrailing” produces an undesirable equity curve!
Have you optimised the p value to give a better equity curve?
See attached – the top is your code as written, the bottom is changed to “trailing 210*pipsize” (95 is for AUD/CAD).
It makes sense to me that your code as written will work live and solve the problem, so I’ve activated both versions.
Have you got ‘tick by tick mode’ enabled in both scenarios.
Without seeing your full code, we would be guessing as to what is wrong, but the top curve sure isn’t going to turn out good! 🙂
Tick mode is on for both. This version got rejected earlier…
if (my conditions) then
buy PositionSize contract at market
SET STOP trailing 210*pipsize
endif
I’m running your code verbatim on a different timeframe GraHal, so I’ll report back when it triggers.
It’s is a simple moving average crossover with a MACD filter, I don’t see how it could be messing with the stop. I will post as a last resort, once I’ve tried a couple of ideas I’ve got 😉
It seems like the pipsize is wrong on PRT? hmmmm
Try this version also to se if you get the same problem / Rejection …
TRAILING
JSParticipant
Senior
Hi,
I think you should use “SET STOP Trailing 210*pipsize*pipvalue”…
The currency is in JPY in the currency pair GBP/JPY…
(the price of GBP/JPY is about 193 so if you only use “pipsize” your 120 will be way above the maximum distance…)
EDIT: pipsize=0.01 pipvalue=0.01 (JPY)
JSParticipant
Senior
“…your 120…” must be “…your 210″…
Are you trading DFB
Leo440
On UK DFB trading GBP/JPY pipsize = 1 … see attached.
Try …
if (my conditions) then
buy PositionSize contract at market
SET STOP trailing 210*ticksize
endif
“SET STOP Trailing 210*pipsize*pipvalue”…
Thanks JS, I’ll add that one to the pile.
Are you trading DFB Leo440
No, cfd mini
Currently trying to get an order through with this
if (my conditions) then
buy PositionSize contract at market
set stop $trailing 21000*positionsize
endif
wish me luck!
“SET STOP Trailing 210*pipsize*pipvalue”…
This underperforms on 30min, outperforms on 1hr (but with a worse equity curve) and fails on 2hr 🙁
Try …
Doesn’t work either sadly.
I’m still getting the same rejection (attached). Is anyone actually trading GBP/JPY with proorder? Could this somehow be because I’m using the mini? I sent a help request through PRT and got an email back saying I should make a thread here *sigh*
Thanks again for your suggestions guys.