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
Help with a order
Collapse
X
-
Hello firecan,
Thank you for clarifying this.
It sounds like you want to enter on every bar that has this condition true, no matter how many of them there are.
To do this, you need to set your Entries per direction to a very high number to prevent this from limiting your entries.
Set the Entries per direction to 999. This should allow for all entries where your conditions are true to be entered.
Leave a comment:
-
No, I try that all bar close up movil average enter long.
if Close (0) > EMA (10)
Enter Long
Enter long the bars 1, 2, 3, 4, -- , 6, 7, 8 and 9. becasue all this bars Close > EMA.
The bars 5 and 10 no enter long.(Close < EMA)
Leave a comment:
-
Hi firecan,
Are you trying to place an order on the 6th bar after this condition is true and for the next 4 bars as well?
Leave a comment:
-
Hello firecan,
I am having trouble understanding your inquiry.
Are you:
1) Trying to place an order 4 bars after this condition is true?
2) Trying to place an order on the 5th bar if the condition is true 5 bars in a row?
3) Trying to place an order on every bar this condition is true for 5 bars in a row?
Leave a comment:
-
subsequent EnterLong() calls NO are ignored if conditions ok
Hello again thanks for your time.
I tried yesterday the exemple 1 but no run. if I change EntriesPerDirection=5. Enter 5 times (first bar condition ok and next 4) but only see if condition first bar is ok and no see the conditions bars 2,3,4 and 5. And the bars 3 and 4 "no condition ok" and send order.
Regards
// Example #1
// If an open position already exists, subsequent EnterLong() calls are ignored.
protected override void Initialize()
{
EntriesPerDirection =5;
EntryHandling = EntryHandling.AllEntries;
}
protected override void OnBarUpdate()
{
if (Close[0]>(EMA(10)
EnterLong("");
}
If an open position already exists, subsequent EnterLong() calls NO are ignored if conditions ok
Leave a comment:
-
Hello,
Are you asking how to allow 5 entries in the same direction?
If so, change the Entries per direction option to 5 in the Strategy parameters when adding the script to a chart or to the Strategies tab of the Control Center.
http://www.ninjatrader.com/support/h...rdirection.htm
Leave a comment:
-
Help with a order
Hello someone can help me with:
Protected override void OnBarUpdate ()
{
// Condition enter long
If Close (1)> Ema (10)
EnterLong (DefaultQuantity, " ");
}
Only enter the first bar that the condicion is ok.
But , what I need to do to enter the next 5 following bars with the same condition ?
Thanks, regards.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
6 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
5 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Leave a comment: