I want an EA that opens pending order as I press button "OK" based on "Horizontal line" that is drawn on chart.
This is how I would probably generate "Horizontal line":
Then with
I could get the price value.
Now.. how do I get some convenient button "OK" that opens pending order when I press it?
This is how I would probably generate "Horizontal line":
Inserted Code
int init()
{
ObjectCreate("Horizontal line", OBJ_HLINE, 0, Time[0], High[0]+High[1]-Low[1]);
ObjectSet("Horizontal line", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("Horizontal line", OBJPROP_COLOR, Green);
ObjectSet("Horizontal line", OBJPROP_WIDTH, 1);
return(0);
} Then with
Inserted Code
ObjectGet("Horizontal line", 1); Now.. how do I get some convenient button "OK" that opens pending order when I press it?