View Single Post
  #100 (permalink)  
Old 07-29-2009, 06:19 PM
V-Force V-Force is offline
Junior Member
 
Join Date: Jul 2009
Location: Indonesia
Posts: 5
V-Force is on a distinguished road
Need help on iCustom function

Quote:
Originally Posted by codersguru View Post
Sure, I'll do.
--------------------------------------------------------------------------------

Codesguru, can help me? I am trying to do an object create of a uptrend or downtrend using iCustom and a histogram indicator that displays Histogram bars above 0 and below 0.

How do i make use of the iCustom function to call on it that when its above 0, it an Uptrend and when its below 0 its a Downtrend? Also, how do i set a popup alert to alert 1 time only?

It goes something like this for now:

string Trigger="";
color colt6;
double trigger1 = iCustom(NULL, 0,"Trigger",24, ??????? , 0);


if ((trigger1 > 0)) { Trigger="UP"; colt6=Lime; }
if ((trigger1 < 0)) { Trigger="DOWN"; colt6=Red; }

ObjectCreate("MA00", OBJ_LABEL, 0, 0, 0);
ObjectSetText("MA00",Trigger,28, "Arial", colt6);
ObjectSet("MA00", OBJPROP_CORNER, 0);
ObjectSet("MA00", OBJPROP_XDISTANCE, 0);
ObjectSet("MA00", OBJPROP_YDISTANCE, 0);

if(Trigger==Up")
Alert(Symbol()," - ","H1:"," Uptrend"," at ", Bid);


Many thanks for anyone who can give a pointer on how I will be able to do the above.
Reply With Quote