Download MetaTrader 5
To add comments, please log in or register
Do you know C++? MQL5 has much in common with it. Just try it yourself!
AYMERIC75
112
AYMERIC75 2014.04.11 17:13 

Hi,

I would like my EA to draw an arrow on the graph when there is a signal of buy. I use Ichimoku for the signal...

int start()
{
   if (senkouA>=senkouB && Bid > senkouA && Chikou_value> Bid)
   {
      if (Tenkan_value==Kijun_value)
      {
         draw an arrow ??????????????????????????????????,
      }
   }
   if (senkouA<=senkouB && Bid > senkouB && Chikou_value> Bid)
   {
      if (Tenkan_value==Kijun_value)
      {
         draw an arrow ??????????????????????????,
      }
   }
}
Any idea ?

Aymeric

Alain Verleyen
Moderator
28520
Alain Verleyen 2014.04.11 17:14  

Hello,

Please use the SRC button when you post code. Thank you.


This time, I edited it for you.

Alain Verleyen
Moderator
28520
Alain Verleyen 2014.04.11 17:20  
AYMERIC:

Hi,

I would like my EA to draw an arrow on the graph when there is a signal of buy. I use Ichimoku for the signal...

Any idea ?

Aymeric

https://book.mql4.com/functions/objects
Keith Watford
Moderator
7875
Keith Watford 2014.04.11 20:48  

I posted some example code in YOUR thread at https://forum.mql4.com/62487

So I assume that you have read it and that code includes drawing arrows.

Daniel Petrovai
440
Daniel Petrovai 2014.04.12 04:52  
AYMERIC:

Hi,

I would like my EA to draw an arrow on the graph when there is a signal of buy. I use Ichimoku for the signal...

Any idea ?

Aymeric


As GumRai posted earlier, use his code to instruct your ea too draw arrows :

   if (senkouA>=senkouB && Bid > senkouA && Chikou_value> Bid)
   {
      if (Tenkan_value==Kijun_value)
      {
         //draw an arrow ??????????????????????????????????,
       string name="FXX_IchiupArrow"+(string)Time[0];
       if(ObjectFind(0,name)!=0)
          {
          ObjectCreate(name,OBJ_ARROW_UP,0,Time[0],Low[index]-(Period()*Point*2));// Time[0] since you are talking about current bar
          ObjectSet(name,OBJPROP_COLOR,ArrowColour);
          ObjectSet(name,OBJPROP_WIDTH,ArrowSize);
          ObjectSetInteger(0,name,OBJPROP_ANCHOR,ANCHOR_TOP);
          }
      }
   }

Give it a name, a color, size and that's that.

And if you don't understand or not sure about how and why, ask if you want to learn

Cheers

/
To add comments, please log in or register