im making a hot but the problem I come across is it enter another trade After my first was done all in same candle. So I enter trade on tick but not price closed. So sometime nq have big a move move in 1 candle. It take profit and enter another trade that candle still haven't finish. How to avoid that.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to enter only 1 trade per 1 candle only
Collapse
X
-
How to enter only 1 trade per 1 candle only
Hi
im making a hot but the problem I come across is it enter another trade After my first was done all in same candle. So I enter trade on tick but not price closed. So sometime nq have big a move move in 1 candle. It take profit and enter another trade that candle still haven't finish. How to avoid that.Tags: None
-
Hello SuperDude123,
Thanks for your post.
To limit your strategy to once per bar, create an int type variable called EntryBar. In your entry set, add the condition of Misc>Current Bar, Not equal, user variables>EntryBar. In the same set add the action Misc>Set EntryBar and in the field click set then select Misc>Current bar.
The first time through EntryBar will not be equal to the systems bar counter Current bar and the first trade will occur and in doing so EntryBar is set to the value of Current bar, so on the next occasion(s) the entry will not be permitted.
Please note that we are asking for your help in keeping our forums organized and in this case this topic is more appropriate for the NinjaTrader8 Strategy Forum. When creating a topic please consider which forum it should be placed in. We will move this topic to the appropriate forum.
- Likes 1
-
-
Hello ezrollin,
Thanks for your posts.
What you are showing in post #4 is correct, that will limit to one entry per bar when you are using the strategy calculate setting of Calculate.OnPriceChaneg or Calculate.OnEachTick.
What happens is if the first time the entry conditions are true, the order is placed and the entrybar variable is set the same as the current bar (system bar counter). On subsequent incoming ticks or price change ( when your other entry condition are true the entry condition of EntryBar Not Equal CurrentBars[0] will not be true and so the action section will not be entered, until a new bar has formed.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment