ROBOT ADX
Forums › ProRealTime English forum › ProOrder support › ROBOT ADX
- This topic has 18 replies, 4 voices, and was last updated 6 years ago by Pablo Jimenez.
Tagged: Adx
-
-
09/27/2018 at 2:48 PM #81467
Pablo Jimenez please post the full code as far as you have got up to now (with Roberto’s changes etc) … then we not all making the same changes and maybe resulting in differences etc?
09/27/2018 at 2:51 PM #81469This is the modified code I used to backtest it
1234567891011121314151617181920212223242526272829// Definición de los parámetros del códigoDEFPARAM CumulateOrders = False // Acumulación de posiciones desactivada// Condiciones para entrada de posiciones largasindicator1 = ExponentialAverage[8](close)c1 = (indicator1 < close)indicator2 = Williams[40](close)c2 = (indicator2 > -50)indicator3 = WilderAverage[8](close)c3 = (indicator3 < close)indicador4 = ADX[14]c4= (indicador4 >= 17 AND indicador4 <= 28)c6 = (summation[2](c1[1]) = 2)c7 = high > high[1]IF c1 AND c2 AND c3 and c4 AND c6 AND c7 THENBUY 1 CONTRACT AT MARKETENDIF// Condiciones de salida de posiciones largasindicator5 = WilderAverage[8](close)c5 = (indicator5 >= close)IF c5 THENSELL AT MARKETENDIF// Stops y objetivosSET STOP pLOSS 1001 user thanked author for this post.
09/27/2018 at 8:28 PM #8149109/29/2018 at 5:08 PM #81603I have finished the robot… thanks for all 😉
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394// Definición de los parámetros del códigoDEFPARAM Preloadbars = 2000DEFPARAM CumulateOrders = false // Acumulación de posiciones desactivada// Horario semanalnoEntryBeforeTime = 083000 // No abrir ordenes antes de las 08:30h. Las que estuvieran abiertas continuan abiertas.hora1 = TIME >= noEntryBeforeTimenoEntryAfterTime = 213000 // No abrir ordenes despues de las 21:30h. Las que estuvieran abiertas continuan abiertas.hora2 = TIME < noEntryAfterTime// Position Sizepositionsize=1// Condiciones para entrada de posiciones largasindicator1 = ExponentialAverage[8](close)indicator6 = ExponentialAverage[36](close)sto8=stochastic[8,3]c1 = (indicator1 < close)//c24 = (indicator6 < close)//c25 = (indicator7 < close)indicator2 = Williams[40](close)c2 = (indicator2 > -50)indicator3 = WilderAverage[8](close)c3 = (indicator3 < close)indicador4 = ADX[14]c4= (indicador4 crosses over 17 and sto8 > sto8[3])// Buen caminoc8= (indicador4 crosses over 20 and sto8 > sto8[3])//Tradec9= (indicador4 crosses over 22 and sto8 > sto8[3])//F2c10= (indicador4 crosses over 24 and sto8 > sto8[3])//F4c11= (indicador4 crosses over 26 and sto8 > sto8[3])//F6c12= (indicador4 crosses over 28 and sto8 > sto8[3])//F8c6 = (summation[2](c1[1]) = 2)// 2 cierres por encima de la ema8c7 = high > high[1] // Maximo a la vela anterior//c50 = high > high[2]IF c1 AND c2 AND c3 AND c6 AND c7 AND (c4 or c8 or c9 or c10 or c11 or c12 ) AND hora1 AND hora2 THENBUY positionsize CONTRACT AT MARKETENDIF// Condiciones de salida de posiciones largasindicator5 = WilderAverage[8](close)c5 = (indicator5 >= close )IF c5 THENSELL AT MARKETENDIF// Condiciones para entrada de posiciones cortasc13 = (indicator1 > close)c26 = (indicator6 > close)c14 = (indicator2 < -50)c15 = (indicator3 > close)c16 = (summation[2](c13[1]) = 2)c17 = low < low[1]//c51= low < low[2]//c52= low[1] < low[2]c18= (indicador4 crosses over 17 and sto8 < sto8[3])c19= (indicador4 crosses over 20 and sto8 < sto8[3])c20= (indicador4 crosses over 22 and sto8 < sto8[3])c21= (indicador4 crosses over 24 and sto8 < sto8[3])c22= (indicador4 crosses over 26 and sto8 < sto8[3])c23= (indicador4 crosses over 28 and sto8 < sto8[3])IF c13 AND c14 AND c15 and c16 AND c17 AND c26 AND (c18 or c19 or c20 or c21 or c22 or c23 ) AND hora1 AND hora2 THENSELLSHORT positionsize CONTRACT AT MARKETENDIF// Condiciones de salida de posiciones cortasc5 = (indicator5 <= close)IF c5 THENEXITSHORT AT MARKETENDIF// Stops y objetivosSET STOP pLOSS 35 -
AuthorPosts
Find exclusive trading pro-tools on
Similar topics: