Discussion of article "Library for easy and quick development of MetaTrader programs (part I). Concept, data management and first results" - page 6 1234567 New comment Artyom Trishkin 2021.02.05 14:10 #51 pennyhunter: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 albertpess 2021.04.25 22:37 #52 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. Parse MT4 html reports Questions from Beginners MQL4 How to read yesterday Artyom Trishkin 2021.04.25 22:39 #53 albertpess: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 ? albertpess 2021.04.25 22:40 #54 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 albertpess 2021.04.25 22:41 #55 Artyom Trishkin:MetaTrader 4 ? or MetaTrader 5 ? MT5 Artyom Trishkin 2021.04.25 22:52 #56 albertpess : 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 albertpess 2021.04.25 23:16 #57 I'm studying your articles. My goal is to learn how to work with classes. albertpess 2021.04.25 23:20 #58 Artyom Trishkin:I would like to know what you are doing. Please insert the code using this button on the toolbar of the message input window 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 } albertpess 2021.04.25 23:21 #59 Спасибо. Я не знал об этой функции. Artyom Trishkin 2021.04.25 23:26 #60 albertpess :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. 1234567 New comment
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.