Alain Verleyen: I know it's a wrong tick value as I checked (Demo and Real account on GlobalPrime, they are both wrong).
I didn't realise that you had actually checked the broker's value. I was a bit surprised that you were so certain that the tick value was wrong by reading the posts here.
I can only imagine that for some reason they have set the contract size for Gold to 100,000 units, the same as Forex whereas usually it would be 100
Wrong. If you trade the EURUSD with a USD account currency, then it is (exactly) $10/pip/lot $1/point/lot (5 digit broker).
1 pip * tickValue / tickSize = 0.0001 * 1 / 0.00001 = $10/lot. Unless you know tick value and tick size you know nothing. If tick value/tick size is wrong, complain to your broker.
You place the stop where it needs to be - where the reason for the trade is
no longer valid. E.g. trading a support bounce the stop goes below the
support.
Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice -
OrderStopLoss| * DeltaPerLot
+ CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is
usually around $10/pip but it takes account of the exchange rates of the pair
vs. your account currency.)
I didn't realise that you had actually checked the broker's value. I was a bit surprised that you were so certain that the tick value was wrong by reading the posts here.
I can only imagine that for some reason they have set the contract size for Gold to 100,000 units, the same as Forex whereas usually it would be 100
I rarely rely on what the user is saying and check by myself ;-)
I checked US500, not Gold. The lot size is 100 actually. It's like their tick value was set for 1 unit (not 100,000 as in this case the value would be too high and not to low).
I rarely rely on what the user is saying and check by myself ;-)
I checked US500, not Gold. The lot size is 100 actually. It's like their tick value was set for 1 unit (not 100,000 as in this case the value would be too high and not to low).
Yes, the S&P500, if the ticksize is 0.01 and tick value is also 0.01 on a $ account that would mean that the contract size for 1 lot has to be 1, not 100.
Does this works on non USD base? i.e UK100, GER30, etc
I 'm looking for currency conversion function via mql5.
how does MT5 computes the cost of SL/TP on a trade? (mouse hover on the SL / TP lines in chart on UK100 trade.shows the points and costs in base currency)
There is obviously a wrong tick value. You should report it to GlobalPrime.
However you should avoid to mix point and tick. A point is not always the same as a tick, so you have to use ticksize instead of point (size).
Arturo Lopez Perez:
But once a trade is taken, each point of the price movement impacts the account by 10$, not 0.1$.
Problem is can we be sure that he is talking about a 1 point movement and not 1 pip? Also we don't know the lot size of his trade.
I know it's a wrong tick value as I checked (Demo and Real account on GlobalPrime, they are both wrong).
Yes, but what would happen if a broker happened to only have 2 Digits for Japanese pairs?
Yes I know that it is probably very rare nowadays.
Did you put my code in a script and check the trade?
I know it's a wrong tick value as I checked (Demo and Real account on GlobalPrime, they are both wrong).
I didn't realise that you had actually checked the broker's value. I was a bit surprised that you were so certain that the tick value was wrong by reading the posts here.
I can only imagine that for some reason they have set the contract size for Gold to 100,000 units, the same as Forex whereas usually it would be 100
Wrong. If you trade the EURUSD with a USD account currency, then it is (exactly) $10/pip/lot $1/point/lot (5 digit broker).
1 pip * tickValue / tickSize = 0.0001 * 1 / 0.00001 = $10/lot. Unless you know tick value and tick size you know nothing. If tick value/tick size is wrong, complain to your broker.
I didn't realise that you had actually checked the broker's value. I was a bit surprised that you were so certain that the tick value was wrong by reading the posts here.
I can only imagine that for some reason they have set the contract size for Gold to 100,000 units, the same as Forex whereas usually it would be 100
I rarely rely on what the user is saying and check by myself ;-)
I checked US500, not Gold. The lot size is 100 actually. It's like their tick value was set for 1 unit (not 100,000 as in this case the value would be too high and not to low).
I rarely rely on what the user is saying and check by myself ;-)
I checked US500, not Gold. The lot size is 100 actually. It's like their tick value was set for 1 unit (not 100,000 as in this case the value would be too high and not to low).
Amount which every point change costs you depends from order lots. You did not show this in the codes.
Meanwhile try this:
{
double margin = AccountFreeMargin();
double Loss = risk * margin;
double volume = Loss / (StopLossPoints * MarketInfo(symbol, MODE_POINT) * MarketInfo(symbol, MODE_TICKVALUE) / MarketInfo(symbol, MODE_TICKSIZE));
return(volume);
}
This worked like a charm, thanks Stanislaw! Beware readers, the risk parameter must be between 0 and 1. (For instance 0.02 is 2% risk).
Works very well except for CFDs on Global Prime where the constants are wrong, of course.
I'll contact Global Prime to check the tick value and tick size on their mt4 server.
apologies on posting on this old thread.
Does this works on non USD base? i.e UK100, GER30, etc
I 'm looking for currency conversion function via mql5.
how does MT5 computes the cost of SL/TP on a trade? (mouse hover on the SL / TP lines in chart on UK100 trade.shows the points and costs in base currency)