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
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.JesseNinjaTrader Customer Service
-
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.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
22 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment