I created a code with a trailing stop using the classic “set stop ptrailing”. I ran the backtest and everything was fine, but when I tested it live on ProOrder, it rejected my orders with this message:
“The trailing stop increase is less than the required minimum. The minimum amount on the increase for this market is 5”.
What does this mean? It had never happened to me with other codes. I set the “set stop ptrailing” to 50. How can i solve it?
is an order to START trailing the stop loss after 50 pips.
Once the trailing starts, the STEP is fixed in 1 pip (this can’t be changed) and that’s likely to be the issue with the error you reported.
I suggest that you replace that instruction with a trailing stop code. You will find many examples in this forum, but the simplest and probably most used one is Nicolas’ code at https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/ (lines 17-56). You simply need to append those lines to your code and set trailingstart =50 and trailingstep to 5+.
Wait, I analyzed the code you proposed to me and it doesn’t seem to me to be a real trailing stop, but more of a TP with steps of 5 if the price goes in favor of the position of 20 but I want there to be a trailing stop even if the position doesn’t go in my favor and it has to be updated every time.
I would like the trailing (the newSL in our case) to be placed immediately at 50 distance from the price as soon as I enter the position even if the trade does not go in my favor so it will stop at -50 like a normal SL, if the price goes in my favor for example by 1 it will update to -49 etc… I do not want to wait for a certain threshold to be reached to activate it.
Do you think that by doing it manually we can avoid the minimum threshold of 5 of the increment that the broker wants with the “set stop ptrailing” instruction?
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.