Greeting all, Hope you’re keeping well and safe. I’m a bit stuck. I have ‘set stop trailing’ in a code I’m testing out, but while the order to buy the stock goes through, the trailing stop doesn’t. When you hover over the rejected sign (under order list) it states the stop distance was too far from the opening market level. I’m not sure what I’m doing wrong??
Thanks Roberto, much appreciated. Any idea on whats happening here. If the code is correct, could it be the timeframe issue that is mentioned on the other post (https://www.prorealcode.com/topic/changing-3-hr-bar-close-time/). Maybe its causing issues? As mentioned the IG platform doesnt mirror the prorealtime platform anymore (used to be the same) in regards to stocks such as amazon, apple (US stocks i think) at time frames such as the 2hr/3hr/4hr. The code used to work fine, so think it may be correlated with this timeframe issue…
otherwise the trailing distance would be recalculated (with ATR) on each period and might be too far from the first place, you can’t enlarge your trailing stop with a limited risk account (if you have this type of account?).
Thanks Nicolas, I will try that. Do you have any idea about the timeframe issue on the platform? It’s not in line with the IG platform – I think that is causing issues too