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 exit trades at set day of week and time
Collapse
X
-
How to exit trades at set day of week and time
Just trying to use the Strategy Builder to say exit all open trades on Friday's at 9:45Tags: None
-
Hello demo166130
Thanks for your post.
You could create a time filter and then exit your positions when the time is reached. There is a sample of how to create a time filter inside the Strategy Builder located in our help guide.
https://ninjatrader.com/support/help...ateTimeFilters
Even though you are creating this strategy in the Strategy Builder, it may be of help to look at the following code sample. This sample demonstrates how to limit trading hours with a time filter.
https://ninjatrader.com/support/help...to_limit_t.htm
Let me know if you have any questions.
Josh G.NinjaTrader Customer Service
-
-
Comment
-
I watched a trade which entered on a Friday and carried over the weekend meaning the logic hasn't had the intended effect
Comment
-
demo166130,
I looked at your screenshots again and I see that your condition that tests for Friday is never going to be true. It looks like you may be comparing Friday to a Time Series instead of a Date Series.
It should look something like my screenshot to create a condition for Friday.
1 PhotoJosh G.NinjaTrader Customer Service
Comment
-
I changed this and it still made no difference. I decided to try and exit trades during lots of times of day and it also made zero difference. The chances that I'm doing something wrong here are far far more likely than there's some weird error in the system. I've attached another image, curious to see what you think.
Comment
-
-
-
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
2 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
61 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
4 responses
3,289 views
1 like
|
Last Post
by jgualdronc
Today, 10:02 AM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
22 views
0 likes
|
Last Post Today, 09:41 AM |
Comment