MQL4 - automated forex trading   /  

Forum

[Help] Object Follow exact Bid Price

Back to topics list To post a new topic, please log in or register

avatar
110
ricx 2011.03.30 18:40 

Hi i try to make an object (using text/ obj_text) to follow (point at exact with bid) bid price so if bid move up it move up if bid move down it move down... but the problem is this "Wingdings 3" font i use isn't plot at the exact bid so i try to manipulate the bid price to make it visually correct...

but this code below (i wrote) unable give me the correct visualization :( any 1 have any idea to do it right?


the "Wingdings 3"

font is like this image:

#property indicator_chart_window

extern   double correction=23;

int init()
  {

   return(0);
  }

int deinit()
  {

   return(0);
  }

int start()
  {
   double Y_Offset=WindowPriceMax(0)-WindowPriceMin(0);

   text("Current spread background", "³", "Wingdings 3", 32, Black, TimeCurrent(), Bid+(Y_Offset/correction), true);

   return(0);
  }

void text(string textname, string text, string font, int fontsize, color textcolor, datetime waktu, double harga, bool background)
  {
   if(ObjectFind(textname)<0) ObjectCreate(textname, OBJ_TEXT, 0, 0, 0);
   ObjectSetText(textname, text, fontsize, font, textcolor);
   ObjectSet(textname, OBJPROP_PRICE1, harga);
   ObjectSet(textname, OBJPROP_TIME1, waktu);
   ObjectSet(textname, OBJPROP_BACK, background);

   return(0);
  }


Sending Trade Signal Via RSS Feed

Sending Trade Signal Via RSS Feed

This is my idea how to send your trade signal as RSS FEEDS , a famous way to communicate with your community's members right now.


avatar
4328
WHRoeder 2011.03.30 20:52 
Bid+(Y_Offset/23)

Put the text at Bid, that's as close as you'll get.

If you want closer create an arrow, only Arrow codes 1-6 point exactly.


avatar
110
ricx 2011.03.31 08:10 

WHRoeder thank you, but this is what i try to find solution about ... i did try to put obj_text to bid, it is not visually correct it show below the bid... that is why i try manipulate Bid so it could visually correct...

Bid+(Y_Offset/23)
"23" is variable if we change the window size or terminal size that "23" must be changed in order to make it visually correct. keep changing "23" isn't "true" solution that's why i ask :)


about arrow that point exactly (Arrow 1-6)... is there any way to convert "Wingdings 3" into "exact pointing arrow" code? couldn't find that exact shape in "Wingdings".


Please someone smart help frustrated "newbie" writer here (x_x)


avatar
110
ricx 2011.04.01 10:10 
bump

avatar
571
brewmanz 2011.04.01 10:22 

You might be confusing this forum to one where time-to-reply is used as some performance metric for the employees^H^H^H^H^H^H^H^H^H members.

For me anyway, this forum gets time left over from living in the real world.


avatar
110
ricx 2011.04.05 13:03 
Okie i won't bump anymore :)
Back to topics list  

To add comments, please log in or register