| |  | |  |  | 
Help writing this complex strategy   The level of ADX can help us to decide which system to use at a given point of time. How to accomplish this goal PLOT ADX(14) ON CHART.IF...
 1)ADX is below 20 - USE OSCILLATOR BASED SYSTEM(STOCHASTIC ETC.)
 2)ADX is above 30 - USE TREND FOLLOWING SYSTEM(MACD ETC.) 3)ADX is at 45 or above it - Be in trade with strict stoploss. 4)ADX IS RISING FROM LEVEL BELOW 18 AND THEN GOING ABOVE 23 - USE TREND FOLLOWING SYSTEM 5)ADX DECLINING FROM LEVEL ABOVE 30 AND THEN GOING BELOW 27 - USE OSCILLATOR BASED SYSTEM   //MACD r1 = Param( "Fast avg", 12, 2, 200, 1 ); r2 = Param( "Slow avg", 26, 2, 200, 1 ); r3 = Param( "Signal avg", 9, 2, 200, 1 ); ml = MACD(r1, r2); sl = Signal(r1,r2,r3);   //stochastic 
periods = Param( "Periods", 15, 1, 200, 1 ); Ksmooth = Param( "%K avg", 3, 1, 200, 1 ); Dsmooth = Param( "%D avg", 3, 1, 200, 1 ); periods = Param( "Periods", 15, 1, 200, 1 ); k=StochK( periods , Ksmooth); d=StochD( periods , Ksmooth, DSmooth );   //ADX range = Param("Periods", 14, 2, 200, 1 ); Avdx=ADX( range);   How to code that use MACD when the ADX is rising ( above mentioned conditions)or how to code that use stoch when adx is declining( above conditions)     Deepak Patade, X - 1992, Nasik.
 |  |  | 
 |  | 
 |