Profile Picture

Round Orders/Fill for future to tick size

Posted By fxgirl 2 Years Ago
Message
Posted Wednesday June 03 2015
Hi there,

I imported data for the E-Mini S&P 500 and set it to "future" and tick size to 0.25.
Still when calculating limit-orders RE will not round the orders or fills to the tick-size and show fills at 2024.231 etc.
Anything else I need to do? Do I have to do the rounding manually in the code for each order?

Thanks!

FxGirl
Posted Friday June 05 2015
Please help I can't figure this out! Sad
Posted Friday June 05 2015
For limit or stop orders you will need to do this manually.  You can use SystemUtils.RoundToNearestTick() to do this (or also RoundToNearestHighTick or RoundToNearestLowTick).

Thanks,
Daniel
Posted Monday June 08 2015
Actually, I went to add logic so that the stop or limit orders RightEdge generates would conform to the tick size, and discovered that this already happens.

If you set a profit target or stop loss on a position using TargetPriceType.RelativeRatio, then RightEdge calculates the limit/stop value for you based on the entry price.  Since it does this and submits the order automatically, you don't get a chance to round the price to the tick value, so RightEdge does it for you.

If you submit a limit or stop order yourself, then you can set the price, and it's up to you to round it to the tick size.

Thanks,
Daniel
Posted Monday June 08 2015
Ah that's nice! Does this also work for limit/stop entry orders?

xoxo

FxGirl
Posted Monday June 08 2015
For entry orders you're specifying the price directly, so you will need to do the rounding yourself (or at least call the methods to round the price).

The thinking around this was that if you're specifying a price directly, you have the chance to round it yourself, and to decide how to round.  If you're just trying to set a profit target or stop loss at X%, then RightEdge figures out the price for you, and you don't get a chance to process it before the order is submitted, so RightEdge should round it for you.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems