Discussion of article "Library for easy and quick development of MetaTrader programs (part I). Concept, data management and first results" - page 6
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks a lot!
I am fairly new to programming and I was afraid of your articles because they look so cryptic and have no pictures in them AHAHAHA.
But no actually they are very well written and well translated and they are helping me jump into object oriented programming.
:)
OK. Your welcome
Apparently there is an error in the following passage:
+------------------------------------------------------------------+
| Returns StopLoss position closing flag |
+------------------------------------------------------------------+
bool COrder::OrderCloseByStopLoss(void) const
{
#ifdef __MQL4__
return(::StringFind(::OrderComment(),"[sl")>WRONG_VALUE);
#else
return
(
this.Status()==ORDER_STATUS_HISTORY_ORDER ? this.OrderReason()==ORDER_REASON_SL :
this.Status()==ORDER_STATUS_DEAL ? this.OrderReason()==DEAL_REASON_SL : false
);
#endif
}
//+------------------------------------------------------------------+
//| Returns the flag for closing the position by TakeProfit |
//+------------------------------------------------------------------+
bool COrder::OrderCloseByTakeProfit(void) const
{
#ifdef __MQL4__
return(::StringFind(::OrderComment(),"[tp")>WRONG_VALUE);
#else
return
(
this.Status()==ORDER_STATUS_HISTORY_ORDER ? this.OrderReason()==ORDER_REASON_TP :
this.Status()==ORDER_STATUS_DEAL ? this.OrderReason()==DEAL_REASON_TP : false
);
#endif
}
The message returned is: 'Status' - undeclared identifier Order.mqh
Unfortunately I can't solve it.
Thank you.
Apparently there is an error in the following passage:
+------------------------------------------------------------------+
| Returns StopLoss position closing flag |
+------------------------------------------------------------------+
bool COrder::OrderCloseByStopLoss(void) const
{
#ifdef __MQL4__
return(::StringFind(::OrderComment(),"[sl")>WRONG_VALUE);
#else
return
(
this.Status()==ORDER_STATUS_HISTORY_ORDER ? this.OrderReason()==ORDER_REASON_SL :
this.Status()==ORDER_STATUS_DEAL ? this.OrderReason()==DEAL_REASON_SL : false
);
#endif
}
//+------------------------------------------------------------------+
//| Returns the flag for closing the position by TakeProfit |
//+------------------------------------------------------------------+
bool COrder::OrderCloseByTakeProfit(void) const
{
#ifdef __MQL4__
return(::StringFind(::OrderComment(),"[tp")>WRONG_VALUE);
#else
return
(
this.Status()==ORDER_STATUS_HISTORY_ORDER ? this.OrderReason()==ORDER_REASON_TP :
this.Status()==ORDER_STATUS_DEAL ? this.OrderReason()==DEAL_REASON_TP : false
);
#endif
}
The message returned is: 'Status' - undeclared identifier Order.mqh
Unfortunately I can't solve it.
Thank you.
MetaTrader 4 ? or MetaTrader 5 ?
The same occurs in:
m_long_prop[ORDER_PROP_PROFIT_EN] = this.ProfitInPoints();
e
m_double_prop[this.IndexProp(ORDER_PROP_PROFIT_FULL)] = this.ProfitFull();
Both snippets inside the Closed parametric constructor
Thank you
MetaTrader 4 ? or MetaTrader 5 ?
MT5
I would like to know what you are doing.
Please insert the code using this button
on the toolbar of the message input window
I'm studying your articles. My goal is to learn how to work with classes.
I would like to know what you are doing.
Please insert the code using this button on the toolbar of the message input window
Спасибо.
Я не знал об этой функции.
I'm studying your articles. My goal is to learn how to work with classes.
Is the test programme included with the article working?
What errors occur?
Please describe in more detail.