If the function needs a preceding entry signal to work properly, how can it be used for the initial entry signal?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
BarsSinceEntry() - Question
Collapse
X
-
BarsSinceEntry() - Question
How does this function work when no entries have occured prior to the time the function was triggered? When I used this in code that was filtering conditions for an entry signal, I found that no entry signals were ever triggered.
If the function needs a preceding entry signal to work properly, how can it be used for the initial entry signal?Tags: None
-
BarsSinceEntry() - Still Confused
Thanks for the prompt response, but I still don't understand.
The code I used was something like this:
if (BarsSinceEntry() > 10)
{
EnterLong();
}
My problem is that nothing happened when the condition was true.
Your initial answer was use either 0 or -1 and test to see what happens. Can you express your answer by telling me what's wrong with my code example above?
Thanks.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
61 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
148 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment