Normalize double price and broker restrictions (solved)

To add comments, please log in or register
Point Zero
799
Point Zero  

Dear friends,

I am having quite a hard time normalizing double prices for certain instruments, for examples, cfd's, because the broker only allows certain values.

For example, some indices allow only SL, TP and TS values which floating value are multiples of 5. Ie: 5000.05, 5000.10, 5000.15, 5000.20, etc.

This is quite a problem because some orders are rejected, and this limitation changes from instrument to instrument.

How do you get over this problem?

Thanks!

Tjipke de Vries
6626
Tjipke de Vries  

you know how to program so

if you have this problem with lotstep how do you handle it in that case ??

GreenMoney
369
GreenMoney  
flaab:

Dear friends,

I am having quite a hard time normalizing double prices for certain instruments, for examples, cfd's, because the broker only allows certain values.

For example, some indices allow only SL, TP and TS values which floating value are multiples of 5. Ie: 5000.05, 5000.10, 5000.15, 5000.20, etc.

This is quite a problem because my some orders are rejected, and this limitation changes from instrument to instrument.

How do you get over this problem?

Thanks!

Your prices must be a multiple of the instrument's ticksize. See, for example, WHRoeder's NormalizePrice() function.
Point Zero
799
Point Zero  
Thirteen:
Your prices must be a multiple of the instrument's ticksize. See, for example, WHRoeder's NormalizePrice() function.
Thanks!
Point Zero
799
Point Zero  
deVries:

you know how to program so

if you have this problem with lotstep how do you handle it in that case ??

Thanks too!
To add comments, please log in or register