Value of PIP in USD
If you account is in USD, then
MarketInfo( CurrencyName, MODE_TICKVALUE)
MarketInfo( CurrencyName, MODE_TICKVALUE)
double PipsPrise(Symb)
{
string S;
S=StringSubstr(Symb,3,3);
if(S=="USD")return(MarketInfo(Symb,MODE_LOTSIZE)*Point);
if(S=="EUR"||S=="GBP"||S=="AUD"||S=="NZD")
return(MarketInfo(Symb,MODE_LOTSIZE)*Point*MarketInfo(S+"USD",MODE_ASK));
if(S=="CHF"||S=="CAD"||S=="JPY"||S=="SEK"||S=="NOK"||S=="SGD"||S=="DKK"||S=="ZAR")
return(MarketInfo(Symb,MODE_LOTSIZE)*Point*(1/MarketInfo("USD"+S,MODE_ASK)));
return(0);
}
Value of PIP in USD
...
pip=PipsPrise("EURUSD");
...
...
pip=PipsPrise(Symbol());
...
In general, for the deposit currency:
double pipValue = MarketInfo(Symbol(), MODE_TICKVALUE);
For a planned trade:
double tradePipValue = MarketInfo(Symbol(), MODE_TICKVALUE)*Lots;
double pipValue = MarketInfo(Symbol(), MODE_TICKVALUE);
For a planned trade:
double tradePipValue = MarketInfo(Symbol(), MODE_TICKVALUE)*Lots;
I'm sure this is simple, but it has me confused.
EURUSD, GBPUSD, NZDUSD, the pip value in USD is a whole number (for 1 lot of EURUSD each pip is worth $10).
This is not necesarily so for EXOTIC, or CAD or JPY pairs... they come in at various values USD...
Is there a way to PROGRAMATICALLY deterimine the PIP value in USD... PRIOR to placing the trade and dividinig known values... ?
Thank you for the help!
-charliev