IG & Trailing Stops
Forums › ProRealTime English forum › ProOrder support › IG & Trailing Stops
- This topic has 8 replies, 4 voices, and was last updated 6 days ago by
JS.
-
-
03/05/2025 at 9:13 AM #244661
I’m using a simple “SET STOP TRAILING 60” in my code but when the order executes, if I look on the IG platform, it’s not showing a stop in place. My assumption was that the stop should be in place with the order, or is PRT managing the stop for me?
If the order should be being placed with a stop, what am I doing wrong?
03/05/2025 at 9:18 AM #244662I should add: the code works fine during a backtest with the stops working as expected, it’s only when I auto trade with IG that the “problem” occurs.
03/05/2025 at 9:44 AM #244666Hi!
Your assumption is correct: when using
SET STOP TRAILING 60
, the trailing stop should be placed along with the order. However, if you are using an account with Limited Risk (which is the default for IG accounts opened through ProRealTime), you can only use Guaranteed Stops and not Trailing Stops.To be able to use regular or Trailing Stops, you would need to contact IG directly and request a change in your account type. IG typically refers to these as Professional Accounts, which allow more flexibility in stop types.
Alternatively, if you want to manually program a trailing stop, you can code it yourself in ProBuilder instead of using the built-in SET STOP TRAILING.
03/05/2025 at 10:12 AM #244668Thanks Ivan. I’m able to place trades with a trailing loss manually with IG, so I don’t think I’m on a Limited Risk account.
03/05/2025 at 10:42 AM #244669My code is:
IF ConditionsToBuy THEN
BUY 1 CONTRACTS AT MARKET
SET STOP TRAILING 60
ENDIF
Is there anything wrong with that?
03/05/2025 at 11:49 AM #24467303/05/2025 at 1:26 PM #244676So, I’ve figured it out, sort of.
If I use SET STOP TRAILING 60 it does actually work. What I’m actually doing is trying to pass a variable:
trailingPercent = 0.5
trailingPoints = tradeprice(1)*(trailingPercent/100)
SET STOP TRAILING trailingPoints
This works fine in a backtest but clearly the value of trailingPoints isn’t being passed to IG correctly. I tried doing it this way because PRT specifically tells me that IG doesn’t support SET STOP %TRAILING so trying to build my own version.
I’ve had a look at some of the suggested alternatives to setting a stop loss but can’t make them work on the actual IG platform the same way as either SET STOP %TRAILING or my fake version does during a backtest.
03/05/2025 at 2:25 PM #24467903/05/2025 at 2:35 PM #244684First, I want to say that, in my case, all the different (IG) “trailing stops” work in automatic and manual trading…
If you do what you mentioned in your last message, namely make the trailing stop dependent on the “TradePrice(1)” then this will never work because the order must first be executed to determine the value of the “TradePrice(1)”…
What you can possibly try, if you want to do it this way, is to remove the trailing stop from the “If-statement”…
IF ConditionsToBuy THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
TrailingPoints=TradePrice(1)*(TrailingPercent/100)
Set Stop Trailing TrailingPoints
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on