Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
How to filter out pre and after market data
Collapse
X
-
How to filter out pre and after market data
I have a system built in TD ameritrade's strategydesk, the system is based on data without including any pre or after market data (all indicators are calculated without pre or after market data). Is it a way to exclude those data in NinjaTrader in a convenient way? Thanks.Tags: None
-
skylimit, you could doubleclick on the chart to setup the needed session begin and end times in its properties - http://www.ninjatrader-support.com/H...roperties.htmlBertrandNinjaTrader Customer Service
-
Thanks for your reply, Bertrand.
I have another question. I coded one strategy in 2 forms. One is initiating position using EnterShort(DefaultQuantity, "") or EnterLong(DefaultQuantity, ""), the other is using Limit order type : EnterLongLimit(DefaultQuantity, GetCurrentAsk(), "") or EnterShortLimit(DefaultQuantity, GetCurrentBid(), "").
Then I ran both real time, I found that when both strategies take a position, the first one using market order would have a position shown in strategy tab of the main control center (1S or 1L), while the limit order strategy doesn't show a position. Both limit order and market order were submitted and filled when I did the test.
Comment
-
Hello skylimit,
Could it be the 'limit - strategy' is not in a strategy position anymore after that limit order was filled? When you applied the 'limit - strategy' you were immediately in a position?
Please see the link below for more information regarding account position vs. strategy position.
JasonNinjaTrader Customer Service
Comment
-
Jason
The "market strategy" and "limit strategy" are of the same logic except the order handling. When I was testing them, I ran them simultaneously. When there was a buy signal, both strategies sent order to IB and both got filled. Then I only saw the "market strategy" with the position shown as 1L in strategy tab of the control center. The "limit strategy", however, still shows no "1L" shown in the same place.
I am still catching up for Ninjatrader programming, thanks for your help.
Originally posted by NinjaTrader_Jason View PostHello skylimit,
Could it be the 'limit - strategy' is not in a strategy position anymore after that limit order was filled? When you applied the 'limit - strategy' you were immediately in a position?
Please see the link below for more information regarding account position vs. strategy position.
http://www.ninjatrader-support2.com/...ount+brokerage
Comment
-
Were the strategies applied on the exact same historical data?
If the data was different, one strategy could have been in a strategy position, while the other is not.
When the limit order was submitted and filled, the strategy that was initially in a strategy position, will show flat under the Strategies-tab.JasonNinjaTrader Customer Service
Comment
-
Jason, I applied two strategies in the same chart, so the data should be the same.
I don't understand your second part of the explanation.
when I started both strategies, both started with flat position. When both strategies got buy signal and sent orders to the brokerage account, both orders were filled in the account, but the limit order strategy doesn't have "1L" shown in strategy tab of the control center.
Originally posted by NinjaTrader_Jason View PostWere the strategies applied on the exact same historical data?
If the data was different, one strategy could have been in a strategy position, while the other is not.
When the limit order was submitted and filled, the strategy that was initially in a strategy position, will show flat under the Strategies-tab.
Comment
-
Hi skylimit, the question Jason raised is - what strategy position where both strategies having before you saw the Market / Limit buys triggering...because you use different orders the strategy historical positions could be different as well even though the chart historical data would be the same.BertrandNinjaTrader Customer Service
Comment
-
At the time of testing, both strategies give the same signal buy market and buy market respectively. I have tried several times, this issue remains consistent. the "Limit strategy" will fire a limit buy order when there is a buy signal. The order got filled, but the strategy tab doesn't show "1L" as expected. Since the logic has a condition to check strategy positions, if there is no 1L shown in strategy tab, I assume it would cause issues for my exit logic.
Originally posted by NinjaTrader_Bertrand View PostHi skylimit, the question Jason raised is - what strategy position where both strategies having before you saw the Market / Limit buys triggering...because you use different orders the strategy historical positions could be different as well even though the chart historical data would be the same.Last edited by skylimit; 11-30-2009, 10:27 AM.
Comment
-
Ok, please try putting
Code:if (Historical) return;
This will ensure both are flat as they place the orders - please also check the limit order one is indeed and filled and thus should report as position for the strategy.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Today, 09:48 PM
|
0 responses
8 views
0 likes
|
Last Post
by mly916
Today, 09:48 PM
|
||
Started by Mikey_, Today, 09:21 PM
|
0 responses
10 views
0 likes
|
Last Post
by Mikey_
Today, 09:21 PM
|
||
Started by cre8able, Today, 05:53 PM
|
3 responses
13 views
0 likes
|
Last Post
by cre8able
Today, 09:20 PM
|
||
Started by Aryan Kumar, Today, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Today, 09:04 PM
|
||
Started by yertle, Yesterday, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Today, 08:38 PM
|
Comment