"Combined stops cannot be used in ProOrder"
Forums › ProRealTime English forum › ProOrder support › "Combined stops cannot be used in ProOrder"
- This topic has 6 replies, 6 voices, and was last updated 4 years ago by GraHal.
-
-
09/27/2016 at 4:27 AM #13776
Can anyone assist please, with the meaning of the above quote from ProOrder. It occurs when I added the trailing stop loss to the MGC Trend Chaser code “SET STOP $LOSS 200 $TRAILING 50”
If I REM out the “$TRAILING 50” it makes no difference, so it can’t mean that the standard stop loss is combined with the trailing stop loss.
The back test is spectacular but without being able to run it in ProOrder, it is useless.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748//-------------------------------------------------------------------------// Main code : MGC Trend Chaser with Trailing Stop//-------------------------------------------------------------------------/// Definition of code parametersDEFPARAM CumulateOrders = false // Cumulating positions deactivatedCOI = WEIGHTEDAVERAGE[14](ROC[11]+ROC[10])MAC= MACDline[12,26,9](close)STO = Stochastic[14,5](close)ST = supertrend[3.3,2]// Conditions to enter long positionsc1 = (COI > COI[1])c2 = (MAC > MAC[1])c3 = (STO > 20)c4 = (STO < 40)c5 = (STO > STO[1])c6 = COI < 0IF HIGHEST[5](c1)=1 AND HIGHEST[5](c2)=1 AND HIGHEST[5](c3)=1 AND HIGHEST[5](c4)=1 AND HIGHEST[5](c5)=1 AND c6 AND NOT ONMARKET THENBUY 1 CONTRACT AT MARKETENDIF//Trailing Stop Loss - not avbailable in ProOrderSET STOP $LOSS 200 $TRAILING 50//ExitIF Close CROSSES UNDER ST THENSELL AT MARKETENDIF// Conditions to enter short positionsc11 = (COI < COI[1])c12 = (MAC < MAC[1])c13 = (STO < 80)c14 = (STO > 60)c15 = (STO < STO[1])c16 = COI > 0IF HIGHEST[5](c11)=1 AND HIGHEST[5](c12)=1 AND HIGHEST[5](c13)=1 AND HIGHEST[5](c14)=1 AND HIGHEST[5](c15)=1 AND c16 AND NOT ONMARKET THENSELLSHORT 1 CONTRACT AT MARKETENDIF//ExitIF close CROSSES OVER ST THENEXITSHORT AT MARKETENDIF09/27/2016 at 8:09 AM #13783Because IG protocol don’t like to have 2 stoploss “hard coded”, it’s not possible for your line 25 to be correctly executed by the server.
That’s why if you plan to use to use trailing stop, you need to use the functions I wrote (or any other ones..). You’ll find trailing stop functions in the blog.
09/27/2016 at 11:37 PM #1383008/14/2018 at 3:49 PM #7815508/14/2018 at 4:15 PM #7815807/14/2020 at 6:40 AM #13920907/15/2020 at 9:26 AM #139225If you look on the link below you will find several hard coded TS … let us know which you find the best / most beneficial please?
-
AuthorPosts
Find exclusive trading pro-tools on