Thanks.
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
Limiting Trades Intra Bar
Collapse
X
-
Limiting Trades Intra Bar
When a strategy is set to calculate signals on each tick intra bar, is there a way to limit the number of trades intra bar using Strategy Builder? I have seen the condition if bars since last exit is say one then ok to take next trade. I guess that works after a bar closes.
Thanks.Tags: None
-
Hello Trader17,
If your condition can become true on every tick its best to use a bool variable. In your entry condition you would check if the bool variable is false and if so allow the entry. As an action in the entry condition set the bool variable to true to turn off the entry condition after the first entry. You would then need an additional set before that which checks the first tick of the bar to reset the bool variable back to false so the condition can continue to work on the next bar.JesseNinjaTrader Customer Service
-
Thanks NinjaTrader_Jesse Now this will work for one trade. Because after one trade I assume it will wait for first tick of bar to reset it. What if you allow 3 trades intra bar on same bar? Does NT8 have something to count trads per bar intra bar?
Thanks.
Comment
-
Hello Trader17,
You would have to implement your own logic for that specific purpose, an int series can be used to count the number of times your condition is true. You would still need to use a bool variable to turn the condition off once you have met the number of trades you wanted.
There is a sample of counting events in the builder here: https://forum.ninjatrader.com/forum/...rategy-builder
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ageeholdings, Today, 07:43 AM
|
0 responses
10 views
0 likes
|
Last Post
by ageeholdings
Today, 07:43 AM
|
||
Started by pibrew, Today, 06:37 AM
|
0 responses
4 views
0 likes
|
Last Post
by pibrew
Today, 06:37 AM
|
||
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
14 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
9 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
12 views
0 likes
|
Last Post Today, 12:38 AM |
Comment