Incorrect calculation of tick-size with MT4?

Posted By: Chaosfreak

Incorrect calculation of tick-size with MT4? - 08/02/13 17:40

Hi,

I just noticed that the calculation of tick-size in Zorro.mq4 is possibly incorrect:

arr[3] = MarketInfo(asset,MODE_POINT) * Factor; // pip

correct:
arr[3] = MarketInfo(asset,MODE_TICKSIZE) * Factor; // pip

For currencies it gives almost the same value, but for indices the values are different on my broker.

For example the tick-size with MODE_POINT on SPX500 is 0.01 (which is incorrect) and with MODE_TICKSIZE it's 0.25 (which is correct).

This affects also the Assets.dta file and gives me a wrong simulation.
Posted By: Spirit

Re: Incorrect calculation of tick-size with MT4? - 08/03/13 10:54

What is a "tick-size"? Is this the same as a pip?
Posted By: Chaosfreak

Re: Incorrect calculation of tick-size with MT4? - 08/03/13 13:48

The tick size is the smallest size by which a asset can move. Pip is used in Forex but isn't the same as tick size.
Posted By: Spirit

Re: Incorrect calculation of tick-size with MT4? - 08/04/13 09:03

Then why do you want to replace the pip size with a tick size? Pips are used in most strategies and they would then all be wrong.
Posted By: Chaosfreak

Re: Incorrect calculation of tick-size with MT4? - 08/04/13 12:33

No, they aren't wrong. It depends from to broker to broker.

It is possible that MODE_POINT and MODE_TICKSIZE gives the same values on some brokers. Like I said on SPX500 the value for MODE_POINT is 0.01 and 0.25 with MODE_TICKSIZE, a step of 0.01 isn't tradable only a step of 0.25 and this must reflect in the calculation.

For example I can't set a stoploss of 1703.14 on my broker. The only steps are 1703.00 and 1703.25.
Posted By: jcl

Re: Incorrect calculation of tick-size with MT4? - 08/05/13 07:16

The size of a PIP normally does not depend from broker to broker. Brokers follow a convention. For instance, a SPX500 pip is not 0.01 and certainly not 0.25, it's 0.1. You're confusing pips, points, and ticks here.

Zorro uses correct pip size settings. Better do not tamper with them, otherwise the stop distances and the profit calculation will be wrong. Your modification above can become expensive when you do that with real money.
© 2024 lite-C Forums