//Module that generates buy/short signals //Original work created by Abnash Singh abnash1978@yahoo.co.uk y = Year(); m = Month(); d = Day(); r = Hour(); e = Minute(); dnum=(m+10)*100+d; tnum=TimeNum()+100000; sby = SelectedValue( y ); sbm = SelectedValue( m ); sbd = SelectedValue( d ); sbr = SelectedValue( r ); sbe = SelectedValue( e ); sdnum = SelectedValue( dnum ); stnum = SelectedValue( tnum ); //=****************************Put Your Buy/Short logic below this line em10=EMA(C,10); em20=EMA(C,20); Buy=Cross(em10,em20); Short=Cross(em20,em10); Plot(em10,"Buy Signal with EMA 10",colorGreen); Plot(em20,"Crossing EMA20",colorRed); shapebuy = IIf(Buy,shapeUpArrow,Null); shapeshort = IIf(Short,shapeDownArrow,Null); PlotShapes( shapeshort, colorRed, 0, High+10); PlotShapes( shapebuy, colorGreen, 0, Low-10); //=****************************End your Buy/SHort logic above this line for (i=1;i