I have a position check in a TradeStation strategy that is not executing correctly in NT. NT keeps adding positions each bar when it should only hold one contract and either reverse or exit.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NTStrategyPosition in simulator mode
Collapse
X
-
NTStrategyPosition in simulator mode
Will NTStrategyPosition work to call up the position of a strategy while in Simulator mode?
I have a position check in a TradeStation strategy that is not executing correctly in NT. NT keeps adding positions each bar when it should only hold one contract and either reverse or exit.Tags: None
-
Hello Shutson,
Yes, it should read the strategy position for the specified strategy. Unfortunately I'm not sure how you would debug this exactly in TS, but I would make sure the equivalent code in TS is generating a value that you expect.
string NTStrategyPosition(string strategyId)Ryan M.NinjaTrader Customer Service
-
Do I need to specify a strategyId in the code or does NT assign its own? Currently I have the test specified as:
If NTStrategyPosition("") = 0 then begin
Yet it continues to run the subroutine even though the strategy took a position during the last bar that remains open.
Comment
-
Passing a strategy id in is optional, but needed should you wish to reference it from other functions via your TS code - http://www.ninjatrader-support.com/H...arameters.htmlBertrandNinjaTrader Customer Service
Comment
-
Thank you Bertrand.
Are you aware of any resource for coding / debugging TradeStation strategies that are executed in NinjaTrader? The sections of NT help pertaining to TS are rudimentary at best. TS does not appear to allow discussions of other platforms on their support forum so there is no help there.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
14 responses
1,789 views
0 likes
|
Last Post
by aligator
Today, 11:47 AM
|
||
Started by Jimmyk, 01-26-2018, 05:19 AM
|
6 responses
837 views
0 likes
|
Last Post
by emuns
Today, 11:27 AM
|
||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
6 responses
3,293 views
1 like
|
Last Post
by jgualdronc
Today, 10:56 AM
|
||
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
13 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
11 responses
63 views
0 likes
|
Last Post Today, 10:08 AM |
Comment