![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Apr 2006
Location: , ,
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
|
I've used symbol mapping to tradethe e-miniS&P using the big S&P charted in TS. How do I map the S&P index, $SPX.X, to trade the e-mini S&P? I tried the following but it does not work:
Symbol map - External.......$SPX.X Please let me know if you have any suggestions. Thanks. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Not sure I follow:
- you need to map the TS instrument "$SPX.X" to NT "ES". I guess you have done that already for the TS "Big S&P" -> mapping should not be the issue - prices/prices ranges and tick sizes potentially are different (have not checked). This could affect price calculations for limit/stop orders.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2006
Location: , ,
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
|
I've rephrased my question. Can you provide an example of how to accomplish symbol mapping from an index to a future contract?
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Rethinking that issue: How about not going through the mapping logic (which could fail for futures due to NT internal expiry handling), but submitting the order on the correct NT instrument in TS right away?
The idea would be to copy/clone e.g. the TS functions NTBuyMarket and NTCommand (called by NTBuyMarket) and put in the actual symbol name, like (see TS function NTCommand) NTCommand = Command(Cmd, Account, "ES 12-06", Action, Quantity, OrderType, LimitPrice, StopPrice, TimeInForce, Oco, OrderId, Template, Strategy);
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Apr 2006
Location: , ,
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
|
Maybe I'm missing something, but I cannot find either functions, NTBuyMarket/NTCommand, in TS. By the way, I have the latest TS build 3258.
|
|
|
|
|
|
#6 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
These are TS functions provided by NT which you need to import into TS after installing NT (they are not there by default). Please consult the docs for how to import those functions.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Apr 2006
Location: , ,
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
|
I've imported the functions but I'm confused as to how to implement your suggestion. Are you saying I should use the NTCommand in my strategy? And if so, should Iwrite it exactly as you suggested by putting "ES 12-06" in the NTCommand line?
|
|
|
|
|
|
#8 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
No, you need to call the "Command" DLL function directly. I provided the NTBuyLimit and NTCommand wrappers of this DLL function to give you an idea on how this all works.
The "Command" DLL function call then holds the NT instrument name e.g. "ES 12-06". Please let me know if you need further assistance. I then will try to get you in touch with someone who provides NT consulting services.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Member
Join Date: Apr 2006
Location: , ,
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
|
I guess I'll need some help. Please let me know who to contact. Thanks.
|
|
|
|
|
|
#10 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|