Prevent SL and TP on the entrance candle
Forums › ProRealTime English forum › ProOrder support › Prevent SL and TP on the entrance candle
- This topic has 7 replies, 4 voices, and was last updated 5 years ago by Be-n.
Tagged: stop loss
-
-
04/26/2019 at 10:42 AM #97191
I come back an old topic about SET STOP LOSS and I am asking help from my English friends 😉
My question is simple (like my english). Is it possible to use SET STOP LOSS only from the following candle (the candle that follows my position) and make this condition strict ? And forbid to close out on the candle entrance with … SET STOP LOSS. If yes, how ? I hope to be clear.
Thanks in advance and sorry for my approximate english.
PS : This is the post originally published in French (ici)
04/26/2019 at 10:49 AM #97193You have to place SET STOP LOSS 0 to remove any stop loss and place it again when you need it.
Be warned that your broker might rise your margin requirements if not SL is placed when a trade is entered.
04/26/2019 at 11:30 AM #97196Is it possible to use SET STOP LOSS only from the following candle (the candle that follows my position)
If you place the code below as the final / bottom line of your strategy then this will achieve what you need?
I stand to be corrected by the coding Wizards?? 🙂
1Set Stop pLoss x04/26/2019 at 11:37 AM #97198No GraHal, ProOrder will read the whole code before the next candle opens, so, no matter where you place it, it’ll be set. The only workaround is to put it in a IF…ENDIF block so that it is executed after the next candle closes.
This has a main drawback, because when a trade is entered ProOrder will use whatever SL had been set by the prior trade that was entered (and exited), so setting it to ZERO on the first candle is the only way not to have it at all.
04/26/2019 at 2:34 PM #9720404/26/2019 at 3:45 PM #97213They behave the same, I tried this code on DAX, 1h TF:
12345678FastMA = average[5]SlowMA = average[20]MyAvg = average[200]IF (FastMA CROSSES OVER SlowMA) AND (close > MyAvg) AND not OnMarket THENBUY AT MARKETSET TARGET pPROFIT 100SET STOP pLOSS 0 //or 10000 or entirely commented out is the sameENDIF04/26/2019 at 5:59 PM #97229They behave the same
Maybe you could try setting a stop loss and then setting it to zero one bar later as I seem to recall that this was what would not work for me before. Sorry my platform is closed at the moment and my girlfriend has decided we are having a PRT free evening otherwise I would test it myself!
05/13/2019 at 10:33 AM #98334Thank you for this solution Robertogozzi ! It corresponds to my expectations ! I’m going to shout it in French ! ^^
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on