I need some help coding a script. I need it to monitor all orders opened / closed and then call a function.
I'm new at MQL4 but I have managed to make a function that draws a price arrow with a different color. If SELL then is colored in red. If BUY then is colored in green. If closed then is colored in Yellow.
I need to have a visual of my trades on the charts, to help me improve my trading.
Any help, is appreciated.
SELL
BUY
CLOSE
I'm new at MQL4 but I have managed to make a function that draws a price arrow with a different color. If SELL then is colored in red. If BUY then is colored in green. If closed then is colored in Yellow.
I need to have a visual of my trades on the charts, to help me improve my trading.
Any help, is appreciated.
Inserted Code
void DrawArrow(datetime ArrowTime, double ArrowPrice, int ArrowCode, color ArrowColor) { string ArrowName = TimeToStr(ArrowTime); Print("Create Arrow - "+TimeToStr(ArrowTime)+" / "+ArrowPrice+" / "+ArrowCode+" / "+ArrowColor); ObjectCreate(ArrowName, OBJ_ARROW, 0, ArrowTime, ArrowPrice); ObjectSet(ArrowName, OBJPROP_ARROWCODE, ArrowCode); ObjectSet(ArrowName, OBJPROP_COLOR, ArrowColor); }
Inserted Code
DrawArrow(OrderOpenTime(), Bid, 5, Red);
Inserted Code
DrawArrow(OrderOpenTime(), Ask, 5, Lime);
Inserted Code
DrawArrow(OrderCloseTime(), OrderClosePrice(), 6, Yellow);
Today I BUY, tomorrow I SELL!