Drawing Horizontal Lines with my EA

 

Friends,


I am trying to modify one of my EAs in MQL4 to draw and move horizontal lines, but it won't draw the lines.  This is the code I'm using.  Can you tell me what is wrong?


    string LT = "LineTest";

    if(ObjectFind(LT))

    {

        ObjectMove(LT, 1, 0, Ask + (20 * Point));

        ChartRedraw(0);

    }

    else

    {

        ObjectCreate(LT, OBJ_HLINE, 0, 0, Ask+(20*Point));

        ObjectSet(LT, 6, Blue);

        ObjectSet(LT, 8, 2);

        ChartRedraw(0);

    }
 
Yep, I've realized that I messed up the ObjectFind) function.  I have corrected it and have the EA writing the lines as I intended.  Thanks
Reason: