Reply

SQ strategies using limit orders don’t trade 6E and 6J futures

5 replies

M1S

Customer, bbp_participant, community, 31 replies.

Visit profile

7 years ago #115303

SQ strategies using limit orders don’t trade 6E and 6J futures in Market Replay and real trading with Ninjatrader. The issue is caused by tick size of these instruments: 0.00005.  If tick size is changed to 0.0001 SQ strategies trade normally.  I reported this issue a month ago and so far it has been ignored.  6E and 6J are very popular currency future instruments.  Not being able to trade them because of Strategy Quant bug is serious issue that needs to be addressed.

0

Robbie

Customer, bbp_participant, community, 17 replies.

Visit profile

7 years ago #138102

I’m a Ninjatrader user as well.  

 

Do you have the SQ Data Symbol definition for 6E specifying Pip/Tick Step & Size as 0.0001 ?

 

I’ve attached what I use.

0

M1S

Customer, bbp_participant, community, 31 replies.

Visit profile

7 years ago #138118

6E tick and step size is set to 0.00005.  This doesn’t affect Ninjatrader behavior.  SQ generated strategy (using 0.0001 or 0.00005 tick/step size) will not trade instruments with 0.00005 tick size when using limit orders.  It looks like a bug in the limit order management.

0

M1S

Customer, bbp_participant, community, 31 replies.

Visit profile

7 years ago #138841

Based on Market Replay tests the following futures can not be traded with StrategyQuant generated strategies due to the bug with limit orders: ZN, ZC, 6E, 6J

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #138845

Hello, 

 
Mark knows about this issue. There is a fix for this you can do on your side immediately
 
In NT open Tools -> Edit NinjaScript -> Edit Strategy, find SQManagedStrategy and find Initialize() method.
There is a line:
string str = Instrument.MasterInstrument.TickSize.ToString(System.Globalization.CultureInfo.InvariantCulture).TrimEnd('0');
replace it with line:
string str = Instrument.MasterInstrument.TickSize.ToString("##.#").TrimEnd('0');
and it should start working correctly.

0

M1S

Customer, bbp_participant, community, 31 replies.

Visit profile

7 years ago #138881

Thanks for the fix but my .cs code does not contain “string str =”  I inserted the line as shown below but this didn’t solve the issue.

 

 

 

 

protected override void Initialize()
        {
            

string str = Instrument.MasterInstrument.TickSize.ToString(“##.#”).TrimEnd(‘0’);

base.Initialize();

            ReplacePendingOrders = true;
            ExitOnClose = true;
            MinimumPTSL = 6;
            MaximumPTSL = 120;
            PendingOrderValidOneBar = false;
            BarsRequired = 120;
            StrictStopPrices = true;
            LimitSignalsToRange = false;
            TimeRangeFrom = 0700;
            TimeRangeTo = 0400;

            MaxTradesPerDay = 50;  // 0 means unlimited
        }

0

Viewing 5 replies - 1 through 5 (of 5 total)