MQL5: Create Buy and Sell arrow
void buydraw()
{
string arrowName="BUYSIGNAL"+iTime(Symbol(),PERIOD_CURRENT,0);
ObjectCreate(Symbol(),arrowName,OBJ_ARROW_BUY,0,iTime(Symbol(),PERIOD_CURRENT,1),iHigh(Symbol(),PERIOD_CURRENT,1));
ObjectSetInteger(0, arrowName, OBJPROP_COLOR, clrLimeGreen);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void selldraw()
{
string arrowName="SELLSIGNAL"+iTime(Symbol(),PERIOD_CURRENT,0);
ObjectCreate(Symbol(),arrowName,OBJ_ARROW_SELL,0,TimeCurrent(),iHigh(Symbol(),PERIOD_CURRENT,1));
ObjectSetInteger(0, arrowName, OBJPROP_COLOR, clrGold);
}
//+------------------------------------------------------------------+
Comments
Post a Comment