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 Balage0922, Today, 07:38 AM
|
0 responses
1 view
0 likes
|
Last Post
by Balage0922
Today, 07:38 AM
|
||
Started by JoMoon2024, Today, 06:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by JoMoon2024
Today, 06:56 AM
|
||
Started by Haiasi, 04-25-2024, 06:53 PM
|
2 responses
19 views
0 likes
|
Last Post
by Massinisa
Today, 05:32 AM
|
||
Started by Creamers, Today, 05:32 AM
|
0 responses
6 views
0 likes
|
Last Post
by Creamers
Today, 05:32 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
12 responses
1,786 views
0 likes
|
Last Post
by Leafcutter
Today, 05:30 AM
|
Comment