Experts: Forex Calculators - page 5

 

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: 

  • Margin Calculator: Calculates the necessary margin required to open and maintain positions.
  • Lot Size Calculator: Calculates the amount of lots one could purchase, based on your risk appetite or strategy.
  • Profit Calculator: Helps traders estimate the potential profit or loss based on input parameters like entry and exit points.
  • Pip Point Value Calculator: Determines the value per pip in a trader’s currency pair for better risk assessment.
  • Pip Price Value Calculator: Calculates the price per pip in the quote currency, aiding in precise trade size and leverage adjustments.

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.

 
Sabino Martiradonna #:

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.

 
amrali #:

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.

many errors in Point Value Calculator. it would be great if it worked like in the image.