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

To add comments, please log in or register
Jose Luis Lominchar
275
Jose Luis Lominchar  

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



Icham Aidibe
11286
Icham Aidibe  
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. 

Jose Luis Lominchar
275
Jose Luis Lominchar  
Icham Aidibe:

Don't forget to add the commission. 

Thank you very much for the rapid and precisse response!

I will try that.

Icham Aidibe
11286
Icham Aidibe  
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 ?  


To add comments, please log in or register