View Single Post
  #7 (permalink)  
Old 02-27-2008, 12:04 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 557
cja is on a distinguished road
Arrow code

Quote:
Originally Posted by Dave137 View Post
I will play with this and see if I can master it. Thanks a bunch. If I get stuck, I will contact you direct.

Thanks again,

Dave
This might help it is a very basic way of putting an arrow onto the chart using Wingdings

string MA_Signal="";
color ma_color;

double price = NormalizeDouble(MarketInfo(Symbol(),9),Digits);
double MA = iMA(Symbol(),0,15,0,1,0,0);

if(MA>price){MA_Signal="ê";ma_color =Red;}
if(MA<price){MA_Signal="é";ma_color =Lime;}


ObjectDelete("Arrow");
ObjectCreate("Arrow", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Arrow",MA_Signal, 80, "Wingdings", ma_color );
ObjectSet("Arrow", OBJPROP_CORNER, 1);
ObjectSet("Arrow", OBJPROP_XDISTANCE, 20);
ObjectSet("Arrow", OBJPROP_YDISTANCE, 40 );

Here is an example indicator with this code in it and another indicator fanSimple which shows the use of the numbered Arrow code ie 233 234 etc

cja

Arrow Wingdings.mq4

fanSimple8-1a_NEW.mq4
Reply With Quote