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
I (think I) read alot about how to calculate profits and loss of open tickets/deals.
In some MQL4/5 talks there so many different opinions and guesses. Im really confused now what is the way or the best way to calculate PnL for the open tickets/deals.
The last thing I read that should work good and correctly is following:
bool OrderCalcProfit(
ENUM_ORDER_TYPE action, // type of the order (ORDER_TYPE_BUY or ORDER_TYPE_SELL)
string symbol, // symbol name
double volume, // volume
double price_open, // open price
double price_close, // close price
double& profit // variable for obtaining the profit value
);
In snippet.txt you can see my (actual) function
And here all my question to this and why I'm confused:Is still don't really understand why there is no function that shows me 1:1 the same as the StrategyTester GUI. As we can see in the picture, the output from the function and the GUI are completely different. And for me GUI PnL looks correct.
What is now the best and optimum way to calculate profits and loss? (I'm actually only want to trade Forex also JPY pairs and maybe later gold)
Is there no best way and I should work with € or $ for profits and loss as inputs?
What I'm doing wrong or what I'm missing here?
Is there a simple way to get PnL (correctly) and just read too much?
I like to work with points, that is (still) possible for PnL?
And when using OrderCalcProfit correctly, what does the term 'profit value' mean? In my case, would the correct 'profit value' be 200 points = 200, $5 = 5, or €5 = 5? I'm confused
Thanks in advance!
Chris