and in your function: CControlsDialog::OnClickButtonCalculate(void), you invoke mPointValue like this, double PointValue=mPointValue(symbol,(bool)order_type), referencing the order type.
but in library Functions.mqh you define mPointValue like this: double mPointValue(string pSymbol = NULL, bool isProfit = true), referencing isProfit.
Could you explain better this parameters corrispondence ?
and in your function: CControlsDialog::OnClickButtonCalculate(void), you invoke mPointValue like this, double PointValue=mPointValue(symbol,(bool)order_type), referencing the order type.
but in library Functions.mqh you define mPointValue like this: double mPointValue(string pSymbol = NULL, bool isProfit = true), referencing isProfit.
Could you explain better this parameters corrispondence ?
with cordiality, Sabino.
MetaTrader 5 calculates profits of long/short orders (or positions) using the appropriate tick_values:
SYMBOL_TRADE_TICK_VALUE_LOSS is used to calculate profit of LONG orders.
SYMBOL_TRADE_TICK_VALUE_PROFIT is used to calculate profit of SHORT orders.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi,
If you want to see this code in action, have a look at this:
https://lionheartfundingprogram.com/tools/trading-calculators/
What I have discovered is a multi-functional trading calculator that includes:
Hope this helps!
Hello Amrali,
in your EA: Point Value Calculator,
and in your function: CControlsDialog::OnClickButtonCalculate(void), you invoke mPointValue like this, double PointValue=mPointValue(symbol,(bool)order_type), referencing the order type.
but in library Functions.mqh you define mPointValue like this: double mPointValue(string pSymbol = NULL, bool isProfit = true), referencing isProfit.
Could you explain better this parameters corrispondence ?
with cordiality, Sabino.
Hello Amrali,
in your EA: Point Value Calculator,
and in your function: CControlsDialog::OnClickButtonCalculate(void), you invoke mPointValue like this, double PointValue=mPointValue(symbol,(bool)order_type), referencing the order type.
but in library Functions.mqh you define mPointValue like this: double mPointValue(string pSymbol = NULL, bool isProfit = true), referencing isProfit.
Could you explain better this parameters corrispondence ?
with cordiality, Sabino.
MetaTrader 5 calculates profits of long/short orders (or positions) using the appropriate tick_values:
SYMBOL_TRADE_TICK_VALUE_LOSS is used to calculate profit of LONG orders.
SYMBOL_TRADE_TICK_VALUE_PROFIT is used to calculate profit of SHORT orders.
Further explanations are here and here.
MetaTrader 5 calculates profits of long/short orders (or positions) using the appropriate tick_values:
SYMBOL_TRADE_TICK_VALUE_LOSS is used to calculate profit of LONG orders.
SYMBOL_TRADE_TICK_VALUE_PROFIT is used to calculate profit of SHORT orders.
Further explanations are here and here.