Results 1 to 2 of 2
 0 Attachment(s)    

Thread: Please Help Trendline Programming WHATS WRONG??

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    11

    Angry Please Help Trendline Programming WHATS WRONG??

    hello,

    i`m newbie at mt4 programming here my code of trendlines but ONLY LINE1 IS DISPLAYING ....code for line1 and line2 the same ??? any idea??

    thanks for help

    guenther
    ---------------------------------------
    input double HIGHPrice =1.8264;
    input double LOWPrice =1.8160;
    ---------------------------------------
    if(TimeCurrent() >= StrToTime("00:00") && ObjectFind("Line1")<0 )
    {
    ObjectCreate("Line1",OBJ_TREND,0,StrToTime("00:00" ),HIGHPrice,StrToTime("17:00"),HIGHPrice,true);
    ObjectSet("Line1",OBJPROP_COLOR,Yellow);
    ObjectSet("Line1",OBJPROP_STYLE,1);
    ObjectSet("Line1",OBJPROP_WIDTH,1);
    ObjectSet("Line1",OBJPROP_RAY_RIGHT,false);
    }

    if(TimeCurrent() >= StrToTime("00:00") && ObjectFind("Line2")<0 )
    {
    ObjectCreate("Line2",OBJ_TREND,0,StrToTime("00:00" ),LOWPrice,StrToTime("17:00"),LOWPrice,true);
    ObjectSet("Line2",OBJPROP_COLOR,Black);
    ObjectSet("Line2",OBJPROP_STYLE,1);
    ObjectSet("Line2",OBJPROP_WIDTH,1);
    ObjectSet("Line2",OBJPROP_RAY_RIGHT,false);
    }

    if(ObjectGet("Line1",OBJPROP_TIME1) < iTime(NULL,PERIOD_D1,0)) ObjectDelete("Line1");
    if(ObjectGet("Line2",OBJPROP_TIME1) < iTime(NULL,PERIOD_D1,0)) ObjectDelete("Line2");

  2. #2
    Junior Member
    Join Date
    Feb 2009
    Posts
    5

    Default

    Do zoom out on chart to see the lines.

Similar Threads

  1. Blessings 3 (sorry wrong forum it's a free one)
    By randy1953 in forum Expert advisors live statements
    Replies: 6
    Last Post: 05-24-2014, 15:18
  2. Need help to verify what wrong with my code
    By hanna in forum MQL programming
    Replies: 1
    Last Post: 02-24-2010, 00:32
  3. Time filter logic is wrong
    By kyojee in forum MQL programming
    Replies: 10
    Last Post: 12-22-2009, 03:47
  4. Open question 2 all // whats the worst performing ea??
    By forex9 in forum Expert advisors live statements
    Replies: 5
    Last Post: 06-05-2009, 17:19

Tags for this Thread

black, code, color, create, displaying, double, idea, input, line1, mt4, period, programming, set, strtotime0000, style, trendline, true, yellow

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


GadgetVersus GadgetVersus FR