How can I making sign ??

 

Hi every one,

How can I making buy or sell sign, when the moving average(14) intersect with moving average(45)? in MT4.

I have this but it still deficient !! if not false .. I don't have much with MQL

===================================================

#property copyright "B&S"

#property link ""

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Red

#property indicator_color2 DodgerBlue

//---- buffers

double Buffer1[];

double Buffer2[];

int i;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

IndicatorBuffers(2);

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,218);

SetIndexBuffer(0,Buffer1);

SetIndexLabel(0,"");

SetIndexStyle(1,DRAW_ARROW );

SetIndexArrow(1,217);

SetIndexBuffer(1,Buffer2);

SetIndexLabel(1,"");

//----

return(0);

}

 
F.M:
Hi every one,

How can I making buy or sell sign, when the moving average(14) intersect with moving average(45)? in MT4.

I have this but it still deficient !! if not false .. I don't have much with MQL

===================================================

#property copyright "B&S"

#property link ""

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Red

#property indicator_color2 DodgerBlue

//---- buffers

double Buffer1[];

double Buffer2[];

int i;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

IndicatorBuffers(2);

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,218);

SetIndexBuffer(0,Buffer1);

SetIndexLabel(0,"");

SetIndexStyle(1,DRAW_ARROW );

SetIndexArrow(1,217);

SetIndexBuffer(1,Buffer2);

SetIndexLabel(1,"");

//----

return(0);

}

No anyone can help me??

 

This indicator is having some sell and buy (sell stop and buy stop) signs. You may look at this. Sorry but I can not help.

Files:
 
newdigital:
This indicator is having some sell and buy (sell stop and buy stop) signs. You may look at this. Sorry but I can not help.

thanks newdigital I'll try it

 

#property copyright "Dez Muthafuckin Nutz"

#property link "m y s t i k v g v ♥ y a h o o d0t c om"

extern int ShortEma=14;

extern int LongEma=45;

extern int ArrowDistance=7;

#property indicator_buffers 2

#property indicator_chart_window

#property indicator_color1 Blue

#property indicator_color2 Red

double ExtMapBuffer1[];

double ExtMapBuffer2[];

double Signal1,Signal2;

int init()

{

IndicatorBuffers(2);

SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,2);

SetIndexArrow(0, 234);

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,2);

SetIndexArrow(1, 233);

SetIndexBuffer(1,ExtMapBuffer2);

return(0);

}

int start()

{

int counted_bars=IndicatorCounted();

//----

int i = Bars - counted_bars - 1;

while (i>=0)

{

Signal1=0;

Signal2=0;

double EmaL0 = iMA(NULL,0,LongEma,0,MODE_EMA, PRICE_CLOSE, i);

double EmaL1 = iMA(NULL,0,LongEma,0,MODE_EMA, PRICE_CLOSE, i+1);

double EmaS1 = iMA(NULL,0,ShortEma,0,MODE_EMA, PRICE_CLOSE, i+1);

double EmaS0 = iMA(NULL,0,ShortEma,0,MODE_EMA, PRICE_CLOSE, i);

if (EmaS1>EmaL1 && EmaS0<EmaL0 ) Signal1=High;

if (EmaS1EmaL0 ) Signal2=Low;

ExtMapBuffer1= Signal1+ArrowDistance*Point;

ExtMapBuffer2= Signal2-ArrowDistance*Point;

i--;

}

//----

return(0);

}