Above 90% winning rate but auto stopped out from running in Proorder
Forums › ProRealTime English forum › ProOrder support › Above 90% winning rate but auto stopped out from running in Proorder
- This topic has 71 replies, 7 voices, and was last updated 4 years ago by kkkok288.
-
-
12/06/2019 at 4:35 PM #11435412/06/2019 at 4:49 PM #114355
Hi Nicolas
I agree with your suggestion. May I know how to modify my coding in the EA?
All the while I am using ‘Simplified Creation, mode to setup an EA.
I am not good in coding. May I know where can I learn a proper coding lesson in Probuilder?
12/06/2019 at 5:37 PM #114357You can restrain the trading to market hours (set starttime and endtime in the code), with this version of the code (copy/paste from GraHal version):
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedstarttime=080000endtime=180000tcondition=time>=starttime and time<endtimeif tcondition then// Conditions to enter long positionsindicator1 = Average[1](DI[14](close))c1 = (indicator1 CROSSES OVER -40)indicator2 = Momentum[12](close)c2 = (indicator2 <= -350)indicator3 = CCI[20]c3 = (indicator3 < -95)IF c1 AND c2 AND c3 THENBUY 1 PERPOINT AT MARKETENDIF// Conditions to enter short positionsindicator5 = Average[1](DI[14](close))c5 = (indicator5 CROSSES UNDER 10)indicator6 = Momentum[12](close)c6 = (indicator6 <= 33)indicator7 = Volumec7 = (indicator7 <= 1300)indicator8 = Volumec8 = (indicator8 >= 100)indicator9 = ExponentialAverage[9](MACDline[12,26,9](close))indicator10 = MACDline[12,26,9](close)c9 = (indicator9 <= indicator10)indicator11 = Average[5](volume)-Average[25](volume)c10 = (indicator11 >= -300)indicator12 = AverageTrueRange[14](close)c11 = (indicator12 >= 12)indicator13 = Stochastic[14,3](close)c12 = (indicator13 < 88)indicator14 = ExponentialAverage[9](MACDline[12,26,9](close))indicator15 = MACDline[12,26,9](close)c13 = (indicator14[1] < indicator15[1])indicator16 = ExponentialAverage[9](MACDline[12,26,9](close))indicator17 = MACDline[12,26,9](close)c14 = (indicator16[2] < indicator17[2])c15 = (close < close[1])indicator18 = MoneyFlowIndex[14]c16 = (indicator18 <= 75)indicator19 = MoneyFlowIndex[14]c17 = (indicator19 >= 40)indicator20 = Momentum[12](close)c18 = (indicator20 >= 20)IF c5 AND c6 AND c7 AND c8 AND c9 AND c10 AND c11 AND c12 AND c13 AND c14 AND c15 AND c16 AND c17 AND c18 THENSELLSHORT 1 PERPOINT AT MARKETENDIFendif// Conditions to exit long positionsindicator4 = SAR[0.02,0.02,0.2]c4 = (close CROSSES UNDER indicator4)IF c4 THENSELL AT MARKETENDIF// Conditions to exit short positionsindicator21 = SAR[0.02,0.02,0.2]c19 = (close CROSSES OVER indicator21)IF c19 THENEXITSHORT AT MARKETENDIF(not tested)
12/07/2019 at 8:15 AM #11437712/08/2019 at 10:40 AM #11441512/12/2019 at 12:37 PM #11473312/12/2019 at 12:49 PM #114734Hi, guys.
I am having the same problem of auto stopped from Proorder although I have added the code DEFPARAM PreLoadBars = 20000.
This EA is for Hong Kong (A$1) market with 15 min timeframe. It generates good result on the backtest.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566//————————————————————————-// Main code : hk15m C>YC CcoOmfiP95L100-2(1)//————————————————————————-// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM PreLoadBars = 20000// Prevents the system from creating new orders to enter the market or increase position size before the specified timenoEntryBeforeTime = 091500timeEnterBefore = time >= noEntryBeforeTime// Conditions to enter long positionsc1 = (close >= DClose(1))c2 = (close CROSSES OVER DOpen(0))indicator1 = ADX[14]c3 = (indicator1 > indicator1[1])indicator2 = DIplus[14](close)c4 = (indicator2 >= 26)indicator3 = MoneyFlowIndex[14]c5 = (indicator3 < 50)indicator4 = Average[5](volume)-Average[25](volume)c6 = (indicator4 <= 8500)indicator5 = ADX[14]c7 = (indicator5 >= 14)indicator6 = Average[5](Stochastic[14,3](close))c8 = (indicator6 >= 35)IF (c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8) AND timeEnterBefore THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to enter short positionsc9 = (close < DClose(1))c10 = (close CROSSES UNDER DOpen(0))indicator7 = ADX[14]c11 = (indicator7 < indicator7[1])indicator8 = ADX[14]c12 = (indicator8[1] < indicator8[2])indicator9 = CCI[20]c13 = (indicator9 < -90)indicator10 = CCI[20]c14 = (indicator10 > -200)indicator11 = ADX[14]c15 = (indicator11 >= 13)indicator12 = DI[14](close)c16 = (indicator12 <= 0)indicator13 = Average[5](volume)-Average[25](volume)c17 = (indicator13 < 8500)indicator14 = Average[5](volume)-Average[25](volume)c18 = (indicator14 >= 500)indicator15 = Volumec19 = (indicator15 > 2500)indicator16 = MoneyFlowIndex[14]c20 = (indicator16 > 10)indicator17 = Average[5](Stochastic[14,3](close))c21 = (indicator17 > 10)indicator18 = Momentum[12](close)c22 = (indicator18 <= -25)IF (c9 AND c10 AND c11 AND c12 AND c13 AND c14 AND c15 AND c16 AND c17 AND c18 AND c19 AND c20 AND c21 AND c22) AND timeEnterBefore THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Stops and targetsSET STOP pLOSS 100SET TARGET pPROFIT 10012/12/2019 at 1:01 PM #114736Hi guys.
Another EA with the same problem of auto stopped out from Proorder.
This EA is for Hong Kong (A$1) with 15 min timeframe.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364//————————————————————————-// Main code : hk15mCcoYHcuYLmovoP100L105-(1)//————————————————————————-// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM PreLoadBars = 10000// Prevents the system from creating new orders to enter the market or increase position size before the specified timenoEntryBeforeTime = 091500timeEnterBefore = time >= noEntryBeforeTime// Conditions to enter long positionsc1 = (close CROSSES OVER DHigh(1))indicator1 = DIplus[14](close)c2 = (indicator1 > 12)indicator2 = MACDline[12,26,9](close)c3 = (indicator2 > 0)indicator3 = Momentum[12](close)c4 = (indicator3 > 25)indicator4 = MoneyFlowIndex[14]c5 = (indicator4 < 80)indicator5 = CCI[20]c6 = (indicator5 < 200)indicator6 = Momentum[12](close)c7 = (indicator6 < 75)indicator7 = ADX[14]c8 = (indicator7 > 22)indicator8 = AverageTrueRange[14](close)c9 = (indicator8 > 28)indicator9 = Average[5](volume)-Average[25](volume)c10 = (indicator9 <= 3300)indicator10 = AverageTrueRange[14](close)c11 = (indicator10 < 58)indicator11 = Average[5](volume)-Average[25](volume)c12 = (indicator11 >= -400)indicator12 = CCI[20]c13 = (indicator12 > 0)IF (c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8 AND c9 AND c10 AND c11 AND c12 AND c13) AND timeEnterBefore THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to enter short positionsc14 = (close CROSSES UNDER DLow(1))indicator13 = Stochastic[14,3](close)c15 = (indicator13 < 50)indicator14 = ExponentialAverage[9](MACDline[12,26,9](close))c16 = (indicator14 < 0)indicator15 = Momentum[12](close)c17 = (indicator15 < -100)indicator16 = AverageTrueRange[14](close)c18 = (indicator16 >= 55)indicator17 = Average[5](volume)-Average[25](volume)c19 = (indicator17 <= 7500)indicator18 = Momentum[12](close)c20 = (indicator18 >= -145)IF (c14 AND c15 AND c16 AND c17 AND c18 AND c19 AND c20) AND timeEnterBefore THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Stops and targetsSET STOP pLOSS 105SET TARGET pPROFIT 10012/12/2019 at 1:04 PM #114737Another one with the same problem of auto stopped.
This EA is for Hong Kong (A$1) with 15 min timeframe.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778//————————————————————————-// Main code : hk15m MFIco70 cu20mostPL100(1)//————————————————————————-// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM PreLoadBars = 20000// Prevents the system from creating new orders to enter the market or increase position size before the specified timenoEntryBeforeTime = 091500timeEnterBefore = time >= noEntryBeforeTime// Conditions to enter long positionsindicator1 = MoneyFlowIndex[14]c1 = (indicator1 >= 80)indicator2 = AverageTrueRange[14](close)c2 = (indicator2 < indicator2[1])indicator3 = Average[5](volume)-Average[25](volume)c3 = (indicator3 < -1500)indicator4 = MACDline[12,26,9](close)indicator5 = ExponentialAverage[9](indicator4)c4 = (indicator4 < indicator5)c5 = (close >= close[1])indicator6 = MoneyFlowIndex[14]c6 = (indicator6 CROSSES OVER 70)indicator7 = CCI[20]c7 = (indicator7 > -80)indicator8 = Stochastic[14,3](close)c8 = (indicator8 > 45)IF (c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8) AND timeEnterBefore THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator9 = MoneyFlowIndex[14]c9 = (indicator9 CROSSES OVER 90)IF c9 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator10 = MoneyFlowIndex[14]c10 = (indicator10 CROSSES UNDER 20)indicator11 = Stochastic[14,3](close)c11 = (indicator11 >= 0)indicator12 = Stochastic[14,3](close)c12 = (indicator12 <= 40)indicator13 = MoneyFlowIndex[14]c13 = (indicator13 < 15)indicator14 = MoneyFlowIndex[14]c14 = (indicator14 >= 10)indicator15 = Average[5](volume)-Average[25](volume)c15 = (indicator15 >= -4200)indicator16 = Momentum[12](close)c16 = (indicator16 < -105)indicator17 = Momentum[12](close)c17 = (indicator17 > -160)indicator18 = CCI[20]c18 = (indicator18 >= -300)indicator19 = Volumec19 = (indicator19 > 0)indicator20 = ADX[14]c20 = (indicator20 <= 65)IF (c10 AND c11 AND c12 AND c13 AND c14 AND c15 AND c16 AND c17 AND c18 AND c19 AND c20) AND timeEnterBefore THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator21 = MoneyFlowIndex[14]c21 = (indicator21 CROSSES UNDER 10)IF c21 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP pLOSS 10012/12/2019 at 1:12 PM #114738>> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text from the code part! Thank you! << 🙂
12/12/2019 at 1:51 PM #11474212/12/2019 at 3:54 PM #114749I think your Issues / Rejects stem from the ‘unusual conditions’ relating to Volume, for example …
It’s just a hunch, so I may be wrong?
12345indicator15 = Average[5](volume)-Average[25](volume)c15 = (indicator15 >= -4200)indicator19 = Volumec19 = (indicator19 > 0)12/13/2019 at 1:19 AM #114789Hi, Grahal
I have used the condition for other EAs in DJI market and there is no problem of auto stopped.
This problem only happens in Hong Kong market.
Do you try to put it run in demo mode?
I have 10 other EAs in Hong Kong market having this problem although the EAs can generate more than 90% winning rate.
12/13/2019 at 6:12 AM #114790DEFPARAM PreLoadBars = 20000 is reset automatically to 10000, this being the maximum allowed.
12/13/2019 at 8:13 AM #114791Do you try to put it run in demo mode?
How often do they take trades?
If trade often (> 1 per day) then yes, I would try for you in Demo and make changes to code if rejected, but I get impatient and need the demo space for other Systems.
I got your us15m DImaccimovoatr testcfd3 to trade once … do you get rejects on that System always / 100% of the time??
-
AuthorPosts