PIPS to win/lose each time 1€, assuming 0,01 lots

 

Could somebody help me to automatize following MQL5 calculations?

I want to know for each symbol, PIPS to win/lose each time JUST 1€, assuming 0,01 lots in each position.

Looking at the image, I have found and approximation of 13 PIPS, but I want to do that automatically using MQL5 functions.

Thanks



 
JLLMNCHR:

Could somebody help me to automatize following MQL5 calculations?

I want to know for each symbol, PIPS to win/lose each time JUST 1€, assuming 0,01 lots in each position.

Looking at the image, I have found and approximation of 13 PIPS, but I want to do that automatically using MQL5 functions.

Thanks



#define ProfitToPts(symbol,profit,vol) profit/vol/SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE)

printf("*** %g",ProfitToPts(_Symbol,1,0.01));

Don't forget to add the commission. 

 
Icham Aidibe:

Don't forget to add the commission. 

Thank you very much for the rapid and precisse response!

I will try that.

 
JLLMNCHR:

Thank you very much for the rapid and precisse response!

I will try that.

You're welcome. I found out that this formula works with forex instruments, on other you'll have to divide by ticksize (which doesn't work on forex).

Don't ask, I don't know why exactly :) Visibly, when TV != TS & PTS ?????

Maybe someone could enlight us ?  


Reason: