Forex
Google

Go Back   Forex Trading > Discussion Areas > Setup Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-25-2006, 05:59 AM
F.M F.M is offline
Junior Member
 
Join Date: Feb 2006
Posts: 3
F.M is on a distinguished road
Question 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);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-27-2006, 11:53 PM
F.M F.M is offline
Junior Member
 
Join Date: Feb 2006
Posts: 3
F.M is on a distinguished road
Quote:
Originally Posted by 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??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-28-2006, 07:42 AM
newdigital newdigital is offline
Administrator
 
Join Date: Sep 2005
Posts: 15,432
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
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.
Attached Files
File Type: mq4 MaksiGen_Range_Move.mq4 (4.7 KB, 59 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-31-2006, 07:49 AM
F.M F.M is offline
Junior Member
 
Join Date: Feb 2006
Posts: 3
F.M is on a distinguished road
Quote:
Originally Posted by 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-27-2006, 08:19 PM
lowphat's Avatar
lowphat lowphat is offline
Senior Member
 
Join Date: Sep 2005
Posts: 199
lowphat is on a distinguished road
Code:
#property copyright "Lowphat"
#property link      "mystikvgv@yahoo.com"

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[i-1];   
      if (EmaS1<EmaL1 && EmaS0>EmaL0 ) Signal2=Low[i-1];
 

   
   ExtMapBuffer1[i-1]= Signal1+ArrowDistance*Point;
   ExtMapBuffer2[i-1]= Signal2-ArrowDistance*Point;
   
   i--;
 }  
//----
   return(0);
}

Last edited by lowphat : 10-27-2006 at 08:22 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
help for making indicator plz dxx Indicators - Metatrader 4 0 03-15-2007 11:04 AM
Loss making EA...............But takechance Expert Advisors - Metatrader 4 15 02-27-2007 09:27 AM
Need help making an EA FibzY Expert Advisors - Metatrader 4 10 11-29-2006 12:00 AM
How to mask external input value with *** sign? Greentooth Metatrader 4 2 10-31-2006 06:33 AM
Can someone please help me making EA for... babarmughal Expert Advisors - Metatrader 4 1 09-12-2006 03:02 PM


All times are GMT. The time now is 08:28 AM.