Thread: How to code?
View Single Post
  #1042 (permalink)  
Old 06-21-2008, 05:13 AM
darkkiller's Avatar
darkkiller darkkiller is offline
Senior Member
 
Join Date: Jul 2007
Location: Malaysia
Posts: 258
darkkiller is on a distinguished road
Price label and text

Hi
can somebody guide/teach me how to put Price label and Text properly.I already search and found this

Putting an object anchored on the right side of the screen

Code:
      if(ObjectFind("P label") != 0)
      {
      ObjectCreate("P label", OBJ_TEXT, 0, Time[0], Close[0]);
      ObjectSetText("P label", "Price", 10, "Arial", Red);
      }
      else
      {
      ObjectMove("P label", 0, Time[0], Close[0]);
      }
Code:
ObjectCreate("Trade", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade", "n", 40, "Wingdings", Red);
   ObjectSet("Trade", OBJPROP_CORNER, 1);
   ObjectSet("Trade", OBJPROP_XDISTANCE, 30);
   ObjectSet("Trade", OBJPROP_YDISTANCE, 30);
But still do not know how to apply.I attach together this indicator for my study in coding

Example like picture below,this is what i want,thanks!!
Attached Images
File Type: gif teach.gif (11.4 KB, 152 views)
Attached Files
File Type: mq4 Pivot_only_H4.mq4 (2.4 KB, 15 views)
Reply With Quote