PDA

View Full Version : Tradestation indicator with ninja, and feedback to confirm we are in sync


kiwibird
09-27-2007, 04:52 PM
I am completely new to ninja,
Im lookng for a tradestation indicator I can put on my chart that will trade ninja. I dont want to use trade station email format for sending. (I would rather a dll)
I would also like the indicator to alert me if the brokerage account and ninja are out of sync. I also will have multiple trading systems in one account, so
functions like if NTMarketPosition("") = will need to reference the market position relative to the chart. ie other systems may be taking the opposite position to what the chart is on.
can anyone help?

NinjaTrader_Ray
09-27-2007, 06:53 PM
Hi,

To accomplish a link between TS --> NT for automated trading execution, you have to program it into your Easy Language strategy. Everything you stated can be done but it requires some clever programming.

If you are not an experienced progammer, then the Email interface is a viable option otherwise, you could contract any EL consultant to do this for you.

kiwibird
09-27-2007, 07:00 PM
Hi,

To accomplish a link between TS --> NT for automated trading execution, you have to program it into your Easy Language strategy. Everything you stated can be done but it requires some clever programming.

If you are not an experienced progammer, then the Email interface is a viable option otherwise, you could contract any EL consultant to do this for you.

I am a very experienced ts programmer. (an official el expert) but I know ziltch about ninja. As my request is something that everyone should find usefull is there something on the forums to do this? Even if it just an indicator that buy / sells according to ts market position via dll. That would be a good place for me to start.

NinjaTrader_Ray
09-27-2007, 07:09 PM
Great.

There is a NTSample strategy that you can run that demonstrates some of the function calls in the DLL. This strategy is installed when you import the ELD that contains all of the DLL functions.

Help Guide resource on this is available here - http://www.ninjatrader-support.com/HelpGuideV6/Installation.html

Function Reference - http://www.ninjatrader-support.com/HelpGuideV6/Functions.html

Apart from this reference sample, there is not additional NinjaTrader provided sample code.

kiwibird
09-27-2007, 08:43 PM
iM MAKING rapid progress. So far this is a postive expereince with Ninja :)

How do we specify the account that the trades go into?


ie when I sell

int NTSellMarket(string orderId, int quantity)


the reason I ask is that

int NTMarketPosition(string account) specifies the account but

int NTSellMarket(string orderId, int quantity) doesnt.
thanks for rapid help in this.

NinjaTrader_Ray
09-27-2007, 09:03 PM
It will use the default account that is set up in NinjaTrader under Tools > Options > ATI.

You will notice that the many of the functions are just wrapper functions of the NTCommand() function. You could just use the NTCommand() function or ammend or create a new wrapper function that places orders with an account parameter.