thank you
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
Code NT7 for Exit long or Short at a 15:40ET
Collapse
X
-
Hello bizzz10, and thank you for your question. Since ExitLong and ExitShort are safe to call even if you aren't in a position, the code is simply
Code:// Flatten everything at 4 PM (so 16:00:00) every day if (ToTime(Time[0]) > 160000) { // comment out to just exit long ExitShort(); // comment out to just exit short ExitLong(); }
Jessica P.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Taddypole, 04-26-2024, 02:47 PM
|
5 responses
30 views
0 likes
|
Last Post
by eDanny
Today, 11:49 AM
|
||
Started by kujista, 04-23-2024, 06:23 AM
|
6 responses
44 views
0 likes
|
Last Post Today, 11:42 AM | ||
Started by giulyko00, 04-24-2024, 12:03 PM
|
7 responses
32 views
0 likes
|
Last Post
by eDanny
Today, 11:35 AM
|
||
Started by NM_eFe, Today, 10:13 AM
|
0 responses
5 views
0 likes
|
Last Post
by NM_eFe
Today, 10:13 AM
|
||
Started by hdge4u, Yesterday, 12:23 PM
|
1 response
10 views
0 likes
|
Last Post
by hdge4u
Today, 09:58 AM
|
Comment