Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
One trade per bar
Collapse
X
-
Hello,
Are these entries and exits or are you just entering the same direction over and over?
This could relate to the setting you are using for Entries Per Direction.
You could also add more filtering such as a Position check in case you are doing tick by tick calculations.
Another idea is to use BarsSinceEntryExecution.
I look forward to being of further assistance.
-
Then obviously you are unlikely to be using Calculate.OnBarClose.Originally posted by Trader17 View PostHow do we limit trades to only one or any number specified per bar / signal? I see it take several hundred on the same bar.
Thanks.
That means that you have to write logic to ensure that things only happen as often as you want. You will need a counter to track your number of entries, and prevent any further entries once the limit is reached. You will have to reset the counter on each bar.
It is too hard to give you code in a vacuum. Post what you have, and someone will be able to put in the additions for you.
Comment
-
Hello,
Thank you for the reply.
Yes potentially, when developing your strategy you would need to try different combinations of items to see what works best for what you are trying. I can only suggest items for you to try, to locate the answer you would need to test this concept using a NinjaScript file and see what the outcome is.
I could suggest adding a condition that uses BarsSinceEntryExecution and see if that solves it. If not, as koganam noted it is difficult to understand the problem with few details.
If you can post the strategy or more details surrounding its use that would be helpful. But we could still only speculate what may be happening, you would likely still need to test whatever ends up being discussed so I would suggest first adding the BarsSinceEntryExecution and if that does not work, provide what you tried and the outcome so we can see where you are at in the script.
I look forward to being of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment