Reply

Change number of lots in Ninjatrader

2 replies

M1S

Customer, bbp_participant, community, 31 replies.

Visit profile

7 years ago #113096

How can I change number of lots in Ninjatrader strategy generated by Strategy Quant?  While I can set number of lots in SQ strategy options when generating a strategy, I often need to adjust this amount when trading in Ninjatrader.  There is no entry for number of lots in Ninjatrader strategy options.  I also don’t see a number of lots specified in Ninjatrader strategy code.  Do I need to add custom code to define number of lots?  If so what would it be for stop/limit orders?  I attached an example of Ninjatrader strategy and Strategy Quant source code.

 

 

0

Mark Fric

Administrator, sq-ultimate, 3 replies.

Visit profile

7 years ago #128285

SQ strategies for NinjaTrader trade with DefaultQuantity, which is usually 1.

 

You can edit this number in the code in Initialize() method, you can add a line there:

 

DefaultQuantity = 2;

 

It is also possible to change Order Properties parameter of the strategy, there you can too change default quantity or use account size to compute quantity.

Mark
StrategyQuant architect

0

M1S

Customer, bbp_participant, community, 31 replies.

Visit profile

7 years ago #128329

Thanks, Mark.  Could you post an example of 1) default quantity change in Order Properties and 2) using account size to compute quantity?

0

Viewing 3 posts - 1 through 3 (of 3 total)