Price cross ( or touch ) Weekly Ema 360

#1
Hi,

I want explore price cross weekly ema 360.

I already use below code for daily cross;

_SECTION_BEGIN("Test");
Title = Name() + " " + Date() + " Open:" + O +"," + " High: " + H +"," + " Low: " + L+"," + EncodeColor( colorBlue ) + " Close: " + C+"," + EncodeColor( colorBlack ) + " Volume: " + V ;//+ EncodeColor( colorBlue )+ "\n" + EncodeColor(colorDarkGreen) + WriteVal (XR, format=1.2 ) + " Price Required for EMA Crossover";
Plot(EMA( Close,360), "", colorRed );
// Identify the price when the MA crosses above the price.
crossOverValue = ValueWhen( Cross( EMA(C, 360), C), C, 1);
// Trigger the buy-signal when the price crosses above the crossOverValue
buySignal = Cross( C, crossOverValue );
// Trigger the Buy signal when the condition is met.
Buy = buySignal;
shape = Buy * shapeUpArrow ;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
// Further code can be written to avoid whip-saws of the buy-signal.
_SECTION_END();



please help me..

thanks...
 

Similar threads