No trades executed in Demo Autotrade
Forums › ProRealTime English forum › ProOrder support › No trades executed in Demo Autotrade
- This topic has 11 replies, 4 voices, and was last updated 4 years ago by
Nicolas.
-
-
08/10/2021 at 3:06 PM #175021
Hi,
I have a strategy that shows results in Demo Backtest but no trades are taken in Demo Autotrade.
My strategy works for USDJPY on the 1 min TF and uses a number of indicators (standard and proprietary) plus I refer to the 15 min, 1hr and 4hr TF for creating “no-entry” conditions. I use PRT v10.3 with IG Markets.
What could be the reason that no trades are executed?
I tested a version of the code where I deleted all references to the 15min and 1hr TF and then trades where taken.
Below is part of my code, so maybe someone experienced can see the problem.
Thanks.
Sascha
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivatedDEFPARAM Preloadbars = 10000// Prevents the system from placing new orders on specified days of the week//daysForbiddenEntry = OpenDayOfWeek = 0//----------------------------------------------------------------------------------------------------//-----------------------------------------------LONG-------------------------------------------------timeframe(4 hour, default)EMA214hr= ExponentialAverage[21](close)Sto84hr = Stochastic[8,3](close)ignored, MFneutral4hr, ignored = CALL "Momentum_F"LBishop1barago4hr = ADX[14][1]>40 AND ADX[14][1]<ADX[14][2] AND ADX[14][2]>ADX[14][3]LongNoentry4hr = LBishop1barago4hrtimeframe(1 hour, default)ignored, MFneutral1hr, ignored = CALL "Momentum_F"ignored, ignored, MFbear1hr = CALL "Momentum_F"Sto141hr = Stochastic[14,3](close)LdoublebeID1hr = close[1]<open[1] AND high[1]<high[2] AND low[1]>low[2] AND close[2]<open[2] AND high[2]<high[3]+0.001 AND low[2]>low[3] AND Sto141hr[1]<Sto141hr[2] AND Sto141hr[2]<Sto141hr[3] AND Sto141hr[3]>94Lbe1DSDbuSS1hr = close[1]>open[1] AND (high[1]-close[1])/MAX(0.00001,(high[1]-low[1]))>0.72 AND Sto141hr[1]<Sto141hr[2] AND Sto141hr[2]>86LbeSID1hr = close[1]<open[1] AND high[1]<high[2] AND low[1]>open[2] AND Sto141hr[1]<Sto141hr[2] AND Sto141hr[2]>Sto141hr[3] AND Sto141hr[2]>79LbeHM1hr = close[1]<open[1] AND (close[1]-low[1])/MAX(0.00001,(high[1]-low[1]))>0.58 AND (open[1]-close[1])/MAX(0.00001,(high[1]-low[1]))<0.27 AND Sto141hr[1]>78LongNoentry1hr = LdoublebeID1hr OR Lbe1DSDbuSS1hr OR LbeSID1hr OR LbeHM1hrtimeframe(15 minute, default)Sto815m = Stochastic[8,3](close)Sto1415m = Stochastic[14,3](close)ATR15m = Averagetruerange[14]ADX15m = ADX[14]EMA815m= ExponentialAverage[8](close)EMA2115m= ExponentialAverage[21](close)EMA5015m= ExponentialAverage[50](close)SMA1015m= Average[10](close)SMA5015m= Average[50](close)SMA20015m= Average[200](close)ignored, MFneutral15m, ignored = CALL "Momentum_F"PlusIncrease, ignored, ignored, ignored, ignored = CALL "PRC_TTM Squeeze 10.3"[20, 2, 20, 1.5, 0, 0]ignored, PlusDecrease, ignored, ignored, ignored = CALL "PRC_TTM Squeeze 10.3"[20, 2, 20, 1.5, 0, 0]ignored, ignored, MinusIncrease, ignored, ignored = CALL "PRC_TTM Squeeze 10.3"[20, 2, 20, 1.5, 0, 0]ignored, ignored, ignored, MinusDecrease, ignored = CALL "PRC_TTM Squeeze 10.3"[20, 2, 20, 1.5, 0, 0]LTTMdown15m = PlusDecrease<PlusDecrease[1] AND PlusDecrease[1]<PlusDecrease[2] AND PlusDecrease>0 AND PlusDecrease[1]>0 AND PlusDecrease[2]>0LTTMdown15m2 = MinusIncrease>MinusDecrease[1] AND MinusDecrease[1]<MinusDecrease[2] AND MinusIncrease<0 AND MinusDecrease[1]<0 AND MinusDecrease[2]<0LbuHMatSMA200 = close[1]>open[1] AND (open[1]-low[1])/MAX(0.00001,(high[1]-low[1]))>0.53 AND (close[1]-open[1])/MAX(0.00001,(high[1]-low[1]))<0.25 AND open[1]<SMA20015m[1] AND close>SMA20015m[1] AND Sto1415m[1]>88Lbe1DSDupbeRB15m = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND close[2]>open[2] AND Sto815m[1]<Sto815m[2] AND Sto815m[2]<Sto815m[3] AND Sto815m[3]>92LHLRange15m = (high[1]-low[1])/ATR15m[2]>5.9LEMA21belowSMA5015m = EMA2115m<SMA5015m AND ADX[14]>47LEMA21belowSMA5015m2 = EMA2115m<SMA5015m AND Sto815m>80 AND EMA2115m[3]<EMA5015m[3] AND EMA2115m[4]>EMA5015m[4]LbeSID15m = close[1]<open[1] AND high[1]<high[2] AND low[1]>low[2] AND Sto815m[1]<Sto815m[2] AND Sto815m[2]>Sto815m[3] AND Sto815m[2]>85LMFbear1hrMFneutral15m = MFbear1hr=1 AND MFneutral15m=1 AND Sto1415m>90//-----------------------------------------------------------------------LbeSS15m = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND (high[1]-open[1])/MAX(0.00001,(high[1]-low[1]))>0.58 AND (open[1]-close[1])/MAX(0.00001,(high[1]-low[1]))<0.26 AND close[2]>open[2] AND Sto1415m[1]<Sto1415m[2] AND Sto1415m[2]>90LbeSS15m2 = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND (high[1]-open[1])/MAX(0.00001,(high[1]-low[1]))>0.56 AND (open[1]-close[1])/MAX(0.00001,(high[1]-low[1]))<0.33 AND close[2]>open[2] AND Sto1415m[1]>82//-----------------------------------------------------------------------Ldoublebe1DSDupup15m = close[1]>open[1] AND close[1]>high[2] AND close[2]>open[2] AND Sto1415m[1]<Sto1415m[2] AND Sto1415m[2]<Sto1415m[3] AND Sto1415m[3]>88LDojiSS15m = close[1]=open[1] AND high[1]>high[2] AND (high[1]-close[1])/MAX(0.00001,(high[1]-low[1]))>0.70 AND Sto1415m[1]>91LRR5515m2 = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND high[1]>highest[55](high)[3] AND close[1]<highest[55](high)[3] AND close[2]>open[2] AND close[2]>highest[55](high)[3] AND highest[55](high)[3]<=highest[55](high)[4] AND highest[55](high)[4]<=highest[55](high)[5] AND highest[55](high)[5]<=highest[55](high)[6] AND highest[55](high)[6]<=highest[55](high)[7] AND highest[55](high)[7]<=highest[55](high)[8] AND Sto1415m[1]>79LbeRB15m = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND close[2]>open[2] AND Sto1415m[1]>69 AND PlusDecrease[1]<PlusIncrease[2] AND PlusIncrease[2]>PlusDecrease[3] AND PlusDecrease[1]>0 AND PlusIncrease[2]>0LbeKRB15m = close[1]<open[1] AND high[1]>high[2] AND low[1]<low[2] AND close[1]<close[2] AND close[2]>open[2] AND Sto1415m[1]<Sto1415m[2] AND Sto1415m[2]>94LbeTW15m = close[1]<open[1] AND close[1]<open[2] AND close[2]>open[2] AND open[1]>EMA815m[1] AND close[1]<EMA815m[1] AND Sto1415m[1]>80LMFneutralResistanceSMA20015m = MFneutral15m[1]=1 AND close[1]<SMA20015m[1] AND SMA20015m[1]-close[1]<0.7*ATR15m AND Sto815m[1]>78LDowntrend15m2 = EMA815m<EMA2115m AND EMA2115m<SMA5015m AND EMA2115m<SMA20015m AND SMA5015m<SMA20015m AND SMA1015m<EMA815m AND Sto1415m>76LbeRBatSMA5015m = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND close[2]>open[2] AND Sto1415m[1]>86 AND open[1]>SMA5015m[1] AND close[1]<SMA5015m[1]LbeRBatSMA5015m2 = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND close[2]>open[2] AND Sto1415m[1]>68 AND open[1]<SMA5015m[1] AND high[1]>SMA5015m[1] AND close[1]<SMA5015m[1]LongNoentry15m = LTTMdown15m2 OR LbuHMatSMA200 OR Lbe1DSDupbeRB15m OR LHLRange15m OR LEMA21belowSMA5015m OR LEMA21belowSMA5015m2 OR LbeSID15m OR LMFbear1hrMFneutral15m OR LbeSS15m OR LbeSS15m2 OR Ldoublebe1DSDupup15m OR LDojiSS15m OR LRR5515m2 OR LbeRB15m OR LbeKRB15m OR LbeTW15m OR LMFneutralResistanceSMA20015m OR LDowntrend15m2 OR LbeRBatSMA5015m OR LbeRBatSMA5015m2//.........................................................LbuSS15m = close[1]>open[1] AND (high[1]-close[1])/MAX(0.00001,(high[1]-low[1]))>0.59 AND (close[1]-open[1])/MAX(0.00001,(high[1]-low[1]))<0.30 AND Sto1415m[1]>71LDowntrend15m = EMA815m<EMA2115m AND EMA2115m<SMA5015m AND EMA2115m<SMA20015m AND SMA5015m<SMA20015m AND Sto1415m<Sto1415m[1] AND NOT (Sto1415m[1]>Sto1415m[2] AND Sto1415m[2]<Sto1415m[3])LDowntrend15m3 = SMA5015m<SMA20015m AND Sto815m>85 AND SMA20015m-SMA5015m>5*ATR15mLbeSSexit15m = close[1]<open[1] AND high[1]>high[2] AND close[1]<close[2] AND (high[1]-open[1])/MAX(0.00001,(high[1]-low[1]))>0.58 AND (open[1]-close[1])/MAX(0.00001,(high[1]-low[1]))<0.26 AND close[2]>open[2] AND Sto1415m[1]<Sto1415m[2] AND Sto1415m[2]>90LRR5515m = close[1]>open[1] AND high[1]>highest[55](high)[2] AND close[1]<highest[55](high)[2] AND highest[55](high)[2]<=highest[55](high)[3] AND highest[55](high)[3]<=highest[55](high)[4] AND highest[55](high)[4]<=highest[55](high)[5] AND highest[55](high)[5]<=highest[55](high)[6] AND highest[55](high)[6]<=highest[55](high)[7] AND highest[55](high)[7]<=highest[55](high)[8] AND Sto1415m[1]>73LRR55Exit15m = close[1]<open[1] AND (high[1]-open[1])/MAX(0.00001,(high[1]-low[1]))>0.70 AND high[1]>highest[55](high)[2] AND close[1]<highest[55](high)[2] AND highest[55](high)[2]<=highest[55](high)[3] AND highest[55](high)[3]<=highest[55](high)[4] AND highest[55](high)[4]<=highest[55](high)[5] AND highest[55](high)[5]<=highest[55](high)[6] AND highest[55](high)[6]<=highest[55](high)[7] AND Sto1415m[1]>72ADX15above39 = ADX15m[1]>39.5LSto14above9015m = Sto1415m[1]>90LSto14above8615m = Sto1415m[1]>86.7 AND Sto815m[1]>80 AND SMA5015m<SMA20015m AND EMA2115m<SMA20015m AND (Sto1415m[1]<Sto1415m[2] OR (Sto1415m[1]>Sto1415m[2] AND Sto1415m[2]<Sto1415m[3]))LbuSSExit15m = close[1]>open[1] AND (high[1]-close[1])/MAX(0.00001,(high[1]-low[1]))>0.76 AND Sto815m[1]>81 AND SMA5015m[1]<SMA20015m[1]LDowntrendSto8above9415m = close<SMA5015m AND SMA5015m<SMA20015m AND EMA815m<SMA5015m AND EMA2115m<SMA5015m AND Sto815m>94timeframe(1 minute, default)EURJPY = 131.10EMA8 = ExponentialAverage[8](close)EMA21= ExponentialAverage[21](close)//EMA50= ExponentialAverage[50](close)SMA10 = Average[10](close)SMA50 = Average[50](close)SMA200= Average[200](close)Sto14 = Stochastic[14,3](close)Sto8 = Stochastic[8,3](close)ATR = Averagetruerange[14]Green82150, ignored, ignored, ignored = CALL "8-21-50"ignored, Yellow82150, ignored, ignored = CALL "8-21-50"ignored, ignored, Orange82150, ignored = CALL "8-21-50"ignored, ignored, ignored, Red82150 = CALL "8-21-50"MFbull, ignored, ignored = CALL "Momentum_F"ignored, MFneutral, ignored = CALL "Momentum_F"ignored, ignored, MFbear = CALL "Momentum_F"Flag821bull, ignored = CALL "8-21 Flag"//ignored, Flag821bear = CALL "8-21 Flag"PX2bull, ignored = CALL "PowerX 2"ignored, PX2bear = CALL "PowerX 2"//ignored, PMFgreen, ignored, ignored, ignored = CALL "PowerMomentumFlag"ignored, ignored, ignored, PMFred, ignored = CALL "PowerMomentumFlag"Squeezeon, ignored = CALL "Squeeze"Sun = DayOfWeek=0 and time<230000Mon = DayOfWeek=1 and time<=010000 AND SMA10>SMA10[1]Fri = DayOfWeek = 5 and time>=183000//-------------------------------------------Events----------------------------------------GBP3amMondy = DayOfWeek=1 AND time<=030000 AND close>1.3870 AND close<1.3890AUD3amMondy = DayOfWeek=1 AND time<=030000 AND close>0.7580 AND close<0.7590FOMC16062021 = day=16 and month=6 and year=2021 AND time>=120000FOMC28042021 = day=28 and month=4 and year=2021 AND time>=120000ECB22042021 = day=22 and month=4 and year=2021 AND time>=060000 AND time<150000AUDMonetaryPolicyMeetingMinutes = day=15 and month=6 and year=2021 AND time<=050000 AND close>0.7690 AND close<0.7710 //for AUDUSD//CPIforUS10062021 = day=10 and month=06 and year=2021 AND time>=080000 AND time<=140000BOC09062021 = day=9 and month=06 and year=2021 AND time>=050000 AND time<=160000 AND ((close>0.7180 AND close<0.7220)) //NZDUSD indirect impact via CAD->AUDGBPMoneytaryPolicySummary24062021 = day=24 and month=06 and year=2021 AND time>=060000 AND time<140000 AND ((close>1.3960 AND close<1.3980))NFP07052021 = day=7 and month=5 and year=2021 AND time>=080000 AND time<150000GBPMonetaryPolicy24052021 = day=24 and month=5 and year=2021 AND time>=100000 AND time<160000 AND close>1.2050 AND close<1.2080 //for USDCADADPNonFarm30062021 = day=30 and month=6 and year=2021 AND time>=110000 AND time<140000 AND close>1.3850 AND close<1.3870 //for GBPUSDUSCPI13072021 = day=13 and month=7 and year=2021 AND time>=123000 AND time<140000NFP06082021 = day=6 and month=8 and year=2021 AND time>=080000 AND time<150000Events = Sun OR Mon OR GBP3amMondy OR AUD3amMondy OR FOMC16062021 OR FOMC28042021 OR ECB22042021 OR AUDMonetaryPolicyMeetingMinutes OR BOC09062021 OR GBPMoneytaryPolicySummary24062021 OR NFP07052021 OR GBPMonetaryPolicy24052021 OR ADPNonFarm30062021 OR USCPI13072021 OR NFP06082021//-----------------------------------------------------------------------------------------// LongNoentry:LBishop3barsago = ADX[14][3]>40 AND ADX[14][3]<ADX[14][4] AND ADX[14][4]>ADX[14][5]LBishop4barsago = ADX[14][4]>40 AND ADX[14][4]<ADX[14][5] AND ADX[14][5]>ADX[14][6]LBishop6barsago = ADX[14][6]>40 AND ADX[14][6]<ADX[14][7] AND ADX[14][7]>ADX[14][8]LBishop8barsago = ADX[14][8]>40 AND ADX[14][8]<ADX[14][9] AND ADX[14][9]>ADX[14][10]LBishop9barsago = ((ADX[14][9]>40 OR (ADX[14][9]<40) AND ADX[14][10]>40)) AND ADX[14][9]<ADX[14][10] AND ADX[14][10]>ADX[14][11]LBishop10barsago = ADX[14][10]>50 AND ADX[14][10]<ADX[14][11] AND ADX[14][11]>ADX[14][12]LBishop12barsago = ADX[14][12]>50 AND ADX[14][12]<ADX[14][13] AND ADX[14][13]>ADX[14][14]LBishop25barsago = ADX[14][25]>40 AND ADX[14][25]<ADX[14][26] AND ADX[14][26]>ADX[14][27]LAllBishop = LBishop3barsago OR LBishop4barsago OR LBishop6barsago OR LBishop8barsago OR LBishop9barsago OR LBishop10barsago OR LBishop12barsago OR LBishop25barsago//--------LADX14above40 = ADX[14]>40LHLRange = (high-low[1])/ATR[2]>8 AND NOT (MFbull=1 AND MFbull[1]=0)LHLRange2 = (high-low[1])/ATR[2]>5.5 AND Sto14>86Lbe1DSDbuSS = close>open AND high>high[1] AND (high-close)/MAX(0.00001,(high-low))>0.76 AND Sto14<Sto14[1] AND Sto14[1]>93LSMA10crossSMA50 = EMA21>SMA50 AND EMA21[1]<SMA50[1] AND Sto14>92LMFneutral = MFneutral=1 AND Sto14>77 AND Sto8>66LPX2is2andADX14less25 = PX2bull=2 AND PX2bull[1]=2 AND ADX[14]<25Lbe1DSDup = close>open AND close>high[1] AND Sto14<Sto14[1] AND Sto8<Sto8[1] AND Sto14[1]>89 AND (high-low[1])/ATR[2]>4.4Lbe1DSDup2 = close>open AND close>high[1] AND Sto14<Sto14[1] AND Sto8<Sto8[1] AND Sto14[1]>97 AND Sto8[1]>96Lbe1DSDup3 = close>open AND close>high[1] AND Sto14<Sto14[1] AND Sto8<Sto8[1] AND Sto14[1]>75 AND Sto8[1]>78 AND MFneutral15m=1LMFneutral15mSto14above86 = MFneutral15m=1 AND Sto14[1]>87 AND Sto14<Sto14[1]LTTMdown15mWithException = LTTMdown15m AND NOT (MFbull=1 AND MFbull[1]=0)LbuSS15mWithException = LbuSS15m AND Sto8<Sto8[1] AND Sto8[1]<Sto8[2] AND Sto8[2]>88LdoubleMFneutral1hrAnd15m = MFneutral1hr=1 AND MFneutral15m=1 AND Sto14>90LdoubleMFneutral1hrAnd15m2 = MFneutral1hr=1 AND MFneutral15m=1 AND Sto8>83LDowntrend15mSto14above90 = (Sto14>90 OR (Sto14>85 AND Sto8>85) OR (Sto14>77 AND ADX[14]>33)) AND EMA815m<EMA2115m AND EMA2115m<SMA5015m AND EMA2115m<SMA20015mLDowntrend15mWithException = LDowntrend15m AND Sto14>56LDowntrend15mWithException2 = (EMA815m<SMA5015m OR EMA815m<EMA5015m) AND EMA2115m<SMA5015m AND SMA5015m<SMA20015m AND SMA5015m<SMA5015m[1] AND SMA20015m<SMA20015m[1] AND SMA50<SMA200 AND SMA200-SMA50>1.1*ATRLDowntrend15m3WithException = LDowntrend15m3 AND NOT (Green82150=1 AND Green82150[1]=0)LbuHM = close>open AND (open-low)/MAX(0.00001,(high-low))>0.73 AND (close-open)/MAX(0.00001,(high-low))<0.27 AND Sto14>84LbuSSbeforeEntry = close[1]>open[1] AND (high[1]-close[1])/MAX(0.00001,(high[1]-low[1]))>0.61 AND (close[1]-open[1])/MAX(0.00001,(high[1]-low[1]))<0.28 AND Sto8[1]<Sto8[2] AND Sto14[1]>77LbuSSonEntry = close>open AND (high-close)/MAX(0.00001,(high-low))>=0.75 AND (close-open)/MAX(0.00001,(high-low))<=0.25 AND Sto14>65LSMA50crossSMA200b = SMA50>SMA200 AND SMA50[1]<SMA200[1] AND Sto14>72 AND time<060000LSMA10crossEMA21 = SMA10<EMA21 AND SMA10[1]>EMA21[1] AND SMA10<SMA10[1] AND Sto8>65LEMA21crossSMA50 = EMA21>SMA50 AND EMA21[1]<SMA50[1] AND Sto14>70 AND EMA2115m<SMA5015m AND EMA2115m<SMA20015mLADX15mabove50Stoabove80 = Sto14>80 AND ADX15m>50LADX15mabove39andADX1mabove39 = ADX15above39 AND ADX[14]>38.7LFridaySto8above98 = DayOfWeek=5 and time>=170000 AND Sto8>98LADX38be1DSDup = close>open AND Sto14<Sto14[1] AND Sto14[1]>97 AND ADX[14]>38LSto8at100 = Sto8=100LSto14above8615mWithException = LSto14above8615m AND Sto14>73LDowntrendSto8above9415mSto14above88 = LDowntrendSto8above9415m AND Sto14>88LSto1415mabove82Sto14above92 = Sto1415m>82 AND Sto14>92LATRtooLow = ATR<0.005 AND time>230000 AND time<=235900//.........................................................LongNoentry = LAllBishop OR Fri OR LADX14above40 OR LHLRange OR LHLRange2 OR Lbe1DSDbuSS OR LSMA10crossSMA50 OR LMFneutral OR LPX2is2andADX14less25 OR Lbe1DSDup OR Lbe1DSDup2 OR Lbe1DSDup3 OR LMFneutral15mSto14above86 OR LTTMdown15mWithException OR LbuSS15mWithException OR LdoubleMFneutral1hrAnd15m OR LdoubleMFneutral1hrAnd15m2 OR LDowntrend15mSto14above90 OR LDowntrend15mWithException OR LDowntrend15mWithException2 OR LDowntrend15m3WithException OR LbuHM OR LbuSSbeforeEntry OR LbuSSonEntry OR LSMA50crossSMA200b OR LSMA10crossEMA21 OR LEMA21crossSMA50 OR LADX15mabove50Stoabove80 OR LADX15mabove39andADX1mabove39 OR LFridaySto8above98 OR LADX38be1DSDup OR LSto8at100 OR LSto14above8615mWithException OR LDowntrendSto8above9415mSto14above88 OR LSto1415mabove82Sto14above92 OR LATRtooLowLADX15mabove55WithException = ADX15m>55 AND NOT (MFbull=1 AND MFbull[1]=0)LMFneutral2 = MFneutral=1 AND MFneutral[1]=1LHLRange2 = (high-low[1])/ATR[2]>4.4 AND Sto8>76LHLRange3 = (high-low[1])/ATR[2]>3.4 AND Sto8>71 AND Sto14>60LSto14above9015mWithException = LSto14above9015m AND SMA10<SMA10[1]// Without: LPX2is2andADX14less25LongNoentryTMA = LAllBishop OR Fri OR LADX14above40 OR LHLRange OR Lbe1DSDbuSS OR LSMA10crossSMA50 OR LMFneutral OR Lbe1DSDup OR Lbe1DSDup2 OR Lbe1DSDup3 OR LMFneutral15mSto14above86 OR LTTMdown15mWithException OR LbuSS15mWithException OR LdoubleMFneutral1hrAnd15m OR LdoubleMFneutral1hrAnd15m2 OR LDowntrend15mSto14above90 OR LDowntrend15mWithException OR LbuHM OR LbuSSbeforeEntry OR LbuSSonEntry OR LSMA50crossSMA200b OR LSMA10crossEMA21 OR LEMA21crossSMA50 OR LADX15mabove50Stoabove80 OR LADX15mabove39andADX1mabove39 OR LFridaySto8above98 OR LADX38be1DSDup OR LSto8at100 OR LSto14above8615mWithException OR LDowntrendSto8above9415mSto14above88 OR LSto1415mabove82Sto14above92 OR ATR<0.0055 OR LADX15mabove55WithException OR LMFneutral2 OR LHLRange2 OR LHLRange3 OR LSto14above9015mWithException OR LATRtooLow//.........................................................LFiveDayCond55 = highest[55](high)[1]=highest[55](high)[2] AND highest[55](high)[2]=highest[55](high)[3] AND highest[55](high)[3]=highest[55](high)[4] AND highest[55](high)[4]=highest[55](high)[5] AND highest[55](high)[5]=highest[55](high)[6]LFiveDayCond60 = highest[60](high)[1]<=highest[60](high)[2] AND highest[60](high)[2]<=highest[60](high)[3] AND highest[60](high)[3]<=highest[60](high)[4] AND highest[60](high)[4]<=highest[60](high)[5] AND highest[60](high)[5]<=highest[60](high)[6] AND Sto14<92 //USDJPY 09.07.2021 9:45// or 15m Uptrend: EMA8+EMA21 > SMA50LSetup1a = ((LFiveDayCond55 AND close>highest[55](high)[1]) OR (LFiveDayCond60 AND close>highest[60](high)[1])) AND close>open AND EMA8>SMA50 AND EMA21>SMA50 AND SMA50>SMA200 AND PX2bull=3 AND PX2bull[1]=3 AND NOT (ATR<0.4*pipsize) AND (EMA21[1]-SMA50[1]>0.0004) AND ATR>0.005LSetup1c = ((LFiveDayCond55 AND close>highest[55](high)[1]) OR (LFiveDayCond60 AND close>highest[60](high)[1])) AND close>open AND EMA8>SMA50 AND EMA21>SMA50 AND SMA50>SMA200 AND PX2bull=3 AND PX2bull[1]=3 AND NOT (ATR<0.4*pipsize) AND (EMA21[1]-SMA50[1]>0.0004) AND ATR<=0.005LSetup2 = ((LFiveDayCond55 AND close>highest[55](high)[1]) OR (LFiveDayCond60 AND close>highest[60](high)[1])) AND close>open AND EMA8>SMA50 AND EMA21>SMA50 AND SMA50>SMA200 AND ((PX2bull<3 AND PX2bull[1]<3) OR (PX2bull=3 AND PX2bull[1]<3) OR (PX2bull=3 AND PX2bull[1]=3 AND (ATR<0.4*pipsize))) AND (EMA21[1]-SMA50[1]>0.0004)// DD55 breakout + close at breakoutLSetup1b = LFiveDayCond55 AND high>highest[55](high)[1] AND close=highest[55](high)[1] AND close>open AND EMA8>SMA50 AND EMA21>SMA50 AND SMA50>SMA200 AND PX2bull=3 AND PX2bull[1]=3 AND Sto14>Sto14[1] AND Sto8>Sto8[1] AND Sto14<76LSetup3 = ((LFiveDayCond60 AND close>highest[60](high)[1])) AND close>open AND EMA8>SMA50 AND EMA21>SMA50 AND (SMA50<SMA200 AND SMA200-SMA50<0.018) AND PX2bull>2 AND PlusIncrease>0//---------------------------SADX15mabove50SMA10down = ADX15m>50 AND SMA10<SMA10[1]L15mDownSMA10down = EMA2115m<SMA5015m AND EMA2115m<SMA20015m AND SMA10<=SMA10[1]LTMA = Green82150=1 AND Green82150[1]=0 AND close>open AND close>SMA50 AND close>SMA200 AND close>EMA8 AND close>EMA21 AND close>SMA10 AND EMA8>SMA50 AND EMA21>SMA50 AND Sto14>Sto14[1] AND Sto8>Sto8[1] AND Sto14<80 AND Sto8<80 AND LFiveDayCond55 AND MFbull=1 AND NOT Yellow82150[1]=1 AND NOT ( SADX15mabove50SMA10down OR L15mDownSMA10down)LTMA2 = Green82150=1 AND Green82150[1]=0 AND Yellow82150[1]=1 AND close>open AND close>SMA50 AND close>SMA200 AND close>EMA8 AND close>EMA21 AND close>SMA10 AND EMA8>SMA50 AND EMA21>SMA50 AND Sto14>Sto14[1] AND Sto8>Sto8[1] AND Sto14<80 AND Sto8<80 AND LFiveDayCond60 AND (MFbull=1 OR (Flag821bull=1 AND Flag821bull[1]=0)) AND NOT ( SADX15mabove50SMA10down OR L15mDownSMA10down)//.........................................................if not onmarket thenLMarkerATRConq=ATRendifLBuffer = 0.002LBuffer2 = 0.005//LProfitBuffer = 0.00001if (LSetup1a ) AND NOT LongOnMarket AND NOT LongNoentry AND NOT Events AND NOT LongNoentry15m AND NOT LongNoentry1hr AND NOT LongNoentry4hr then//LMarkerConqueror=1LMarkerATRConq=ATRISL = 100*((close-lowest[20](low))/5*4 + LBuffer)TradeRisk = pipvalue*ISL/EURJPYContractSize = 100/TradeRiskBUY ContractSize SHARES AT market//barorder=barindex// Stops and targetsSET STOP LOSS ((close-lowest[20](low))/5*4 + LBuffer)//SET TARGET PROFIT 4.0*ATR + 2*LBuffer //+ LProfitBufferENDIF08/10/2021 at 3:13 PM #175022“I tested a version of the code where I deleted all references to the 15min and 1hr TF and then trades where taken.”
It means that all conditions on separate TFs cannot be met, They are likely to be very strict.
08/10/2021 at 3:24 PM #175026@robertogozzi : But why are then trades showing up in Backtest. That would mean that the conditions on the other TFs are not met and therefore don’t prevent a trade from being entered?
08/10/2021 at 3:51 PM #175028What’s the value for ContractSize, did you GRAPH it ?
08/10/2021 at 4:01 PM #17502908/10/2021 at 4:33 PM #175030just append
1GRAPH ContractSizeto your code, then backtest it.
Then check what’s its value candle by candle in the variable windows that backtest will open just below the equity curve.
You can append more GRAPH instructions if you want to monitor additional variables.
08/10/2021 at 6:04 PM #175042The ContractSize for the last 1000 units on the 1 Min chart was changing between 24 and 34.
When I setup up the system I just put in the max. contracts to 10. Did that prevent the trades from being taken? I was assuming if the calculated contract size would be bigger than the max. amount, the system then just uses the max. amount I set up.
08/10/2021 at 7:20 PM #175044No, that shouldn’t matter.
But it’s worth while trying with 999 contracts,
08/10/2021 at 7:46 PM #175045Thank you. I’ll try it.
Any other idea what to look for?
I was hoping someone in the forum can help me as the responsiveness of ProRealTime support regarding technical reports is a little bit slow. Last week I got a question regarding a request I sent more than two months ago. And two days later another reply from a request from December last year!
08/10/2021 at 9:40 PM #175066I’be been waiting 4+ months for an answer!
08/11/2021 at 3:27 AM #175072I just put in the max. contracts to 10. Did that prevent the trades from being taken? I was assuming if the calculated contract size would be bigger than the max. amount, the system then just uses the max. amount I set up.
Sacha, as far as my experience goes, this does matter. And no, it won’t do less if you set it to less (normally one would not want that).
Also check the available funds. If they are insufficient nothing will happen (obviously). Here too, it won’t go with less.1 user thanked author for this post.
08/11/2021 at 10:46 AM #175090 -
AuthorPosts
Find exclusive trading pro-tools on