trailing stop keeps getting rejected

Forums ProRealTime English forum ProOrder support trailing stop keeps getting rejected

Viewing 7 posts - 1 through 7 (of 7 total)
  • #151599

    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??

     

    #151654

    sorry i put this in the wrong section

    #151658

    Moved to correct place

    #151666

    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…

    #151670

    I have no idea. I can only suggest to use a trailing stop code snippet to replace the built-in SET STOP TRAILING instruction which is a bit awkward.

     

    #151688

    Try with:

    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?).

    #151695

    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

Viewing 7 posts - 1 through 7 (of 7 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login