If the function needs a preceding entry signal to work properly, how can it be used for the initial entry signal?
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
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 Waxavi, Today, 02:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
11 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
||
Started by elirion, Today, 01:36 AM
|
0 responses
4 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 01:30 AM |
Comment