View Full Version : Converting TS strategy signals to NT
Elfsareus
02-12-2006, 05:17 AM
Hi all,
I am new to NT, can somebody please explain how to set up NT so that it will take orders from my TradeStation strategies and implement them with a different broker account (which I have already created and can connect to).
How do I create exit strategies with NT?
Thanks in advance
NinjaTrader_Dierk
02-12-2006, 07:46 AM
Please check out the relevant sections in the online Help Guide. http://www.ninjatrader-support.com/HelpGuide/helpguide.html
e.g. Section: Automated Trading Interface -> TradeStation integration
Elfsareus
02-15-2006, 06:17 AM
Hi Dierk,
Thanks for resposding.
I have been trying to create a strategy with an incorporated DLL text, following the direction I saw on the link you posted. So far when I try to verify the Strategy I get the following Grammar error: Assignment to a function not allowed.
If you could please take a look at the following entry code and tell me what I am doing wrong, I would be grateful.
IF Var26 >= Overbought THEN
Begin
Sell Next Bar at Open ;
NTSellMarket("Cross 26", 1) ;
End ;
IF Var26 <= Oversold THEN
Begin
Buy Next Bar at Open ;
NTSellMarket("Cross 26", 1) ;
End ;
Kind Regards
NinjaTrader_Dierk
02-15-2006, 06:27 AM
Well I'm not an EL expert, so I'm not sure if I can be of any help. Note: You need to understand EL in order to drive NT ATI through EL.
However, here is what I suggest:
You probably need to code something like this:
someVariable = NTSellMarket("Cross 26", 1) ;
Elfsareus
02-15-2006, 08:10 AM
Ok, it seems to work now. Thanks.
Now how do I retrieve the signal on NT? And is there a way I could test to see if this works properly?
NinjaTrader_Ray
02-15-2006, 09:24 AM
Can you eloborate what you mean on retrieving a signal? NT does not retrieve signals but rather, you give it order commands via EL script.
Ray
Elfsareus
02-15-2006, 09:28 AM
Ok, so now that I have the signal being sent via DLL, how does NT see it and enter or exit the market based on it? How do I set NT up so that it will trade the signals on TS automatically?
NinjaTrader_Ray
02-15-2006, 02:32 PM
You have to integrate the order placementfunction calls into your EL script.
For example (in english since I do not know EL)
If (SMA(20) > SMA(50))
NTBuyMarket("myOrderId", numberContracts);
else if(SMA(20) < SMA(50))
NTSellMarket("myOrderId", numberContracts);
Set the default account in the NT Tools-->Options to the account you want the orders to route to. This example is the most basic example.
Please refer to the Automated Trading Interface section in the Help Guide via the Help-->Help menu within NT. There is a TradeStation section with samples.
Ray