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
Order tab and time zone.
Collapse
X
-
Order tab and time zone.
I think there might be a bug in time column on order tab in control center. Local time set to MT on charts however order execution time still shows CT. Or am I missing a setting?Tags: None
-
What time setting do strategies use? The one we set via tools options or CT always? I have configured times not to trade in settings.
-
Hello rocketstock,
NinjaTrader uses the time zone that is setup at Control Center-->Tools-->Options-->General-->Time zone.
Could it be you changed the Time zone setting, but you did not restart NinjaTrader?
If you restart NinjaTrader and then perform a test order while connected to the Simulated Data Feed, does it show time as per the time zone selected?JasonNinjaTrader Customer Service
Comment
-
Thanks I'll try that in the meanwhile this is the setting I have. I want to avoid holding a position so that initial and maintenance margin don't kick in.
For long and short - only enter if time is before 2:29 MT or after 4:03 PM MT
Times[Default input][0].TimeOfDay < new TimeSpan(14, 29, 0)
Times[Default input][0].TimeOfDay > new TimeSpan(16, 3, 0)
For close - close everything before 2:30 MT if any position are open account. Close all long and short between 2:29 and 2:30 MT
Times[Default input][0].TimeOfDay >= new TimeSpan(14, 29, 0)
Times[Default input][0].TimeOfDay <= new TimeSpan(14, 30, 0)
Position.MarketPosition != MarketPosition.Flat
Would these be correct to avoid any initial and maintenance margin?Last edited by rocketstock; 02-06-2022, 03:41 PM.
Comment
-
Hi rocket, Please confirm with your broker the exact times. The logic for the time filter is correct. You can also test to make sure the filter works by running the strategy over the Playback connection. There is also a built-in setting for the strategy called ExitOnSessionClose and ExitOnSessionClose seconds that will automatically close any open positions.
Kind regards,
-ChrisLChris L.NinjaTrader Customer Service
Comment
-
Thanks Chris. I will do that.
Meanwhile I tried putting another time logic that wont compile the script. This is for not trading after Friday after market close 1:58 pm MT. Would you able to help?
All conditions below need to meet to open position.
Times[0][0].TimeOfDay.DayOfWeek != DayOfWeek.Friday
Times[Default input][0].TimeOfDay < new TimeSpan(13, 58, 0)
Comment
-
Hi Chris sorry forgot to mention. that was from strategy builder. I didnt code it. I'll try and make it look like yours in strategy builder. Thanks.
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by WHICKED, Today, 12:56 PM
|
2 responses
15 views
0 likes
|
Last Post
by WHICKED
Today, 02:15 PM
|
||
Started by Felix Reichert, Today, 02:12 PM
|
0 responses
1 view
0 likes
|
Last Post Today, 02:12 PM | ||
Started by Tim-c, Today, 02:10 PM
|
0 responses
1 view
0 likes
|
Last Post
by Tim-c
Today, 02:10 PM
|
||
Started by cre8able, Today, 01:16 PM
|
2 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 01:40 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
3 responses
49 views
0 likes
|
Last Post Today, 01:29 PM |
Comment