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
Strategy Builder Help with Basic Pullback
Collapse
X
-
Strategy Builder Help with Basic Pullback
I'm looking to create a pullback trade that works something like this in a simplified fashion. Price breaks a MA pulls back to said MA within X bars then Enter position when bar closes above that X bar high. You have bars ago which points at exact bars but I'm having trouble wrapping my head around how you look can at some bar series.Tags: None
-
Hello synthhokie,
Thanks for your post.
You could accomplish your goal by using a bool variable (it is either true or false) and an int type variable to be used as a bar counter.
When the crossover condition occurs, you would set the bool true and set the bar counter to 1.
While the bool is true and the bar count is less than whatever you want it to be, check to see the relation of price to the moving average and when your entry condition is true place the entry order and set the bool back to false, otherwise increment the bar counter and keep checking until the counter is equal to your x and then set the bool false.
Paul H.NinjaTrader Customer Service
-
Hello synthhokie,
I just noticed that this is posted in NinjaTrader7 Strategy Forum and you have mentioned the Strategy Builder which is only in NinjaTrader8.
Can you clarify what you are using/looking for?
If this should be in another forum, I will move the topic, no worries.
Paul H.NinjaTrader Customer Service
Comment
-
How do I setup the bar counter? I can create the int variable but how does it "Count" so to speak.
Comment
-
Hello synthhokie,
Thanks for your reply.
If you are using the Strategy Builder in NinjaTrader8 then it is possible to do a bar counter but it is advanced topic.
If you are using the NinjaTrader7 Strategy wizard then it cannot be done.
So let's find out which one you are using and go from there.
Paul H.NinjaTrader Customer Service
Comment
-
-
Hello synthhokie,
Thanks for your reply.
The topic has been moved.
Here is a link to a thread where I posted an example bar counter for the strategy builder: https://ninjatrader.com/support/foru...r-confirmationPaul H.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Rogers101, 05-05-2024, 11:30 AM
|
10 responses
35 views
0 likes
|
Last Post
by Rogers101
Today, 08:06 AM
|
||
Started by tradingnasdaqprueba, Today, 03:42 AM
|
2 responses
21 views
0 likes
|
Last Post Today, 08:02 AM | ||
Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
|
21 responses
114 views
0 likes
|
Last Post Today, 08:01 AM | ||
Started by Quanto, 04-17-2024, 10:43 AM
|
3 responses
28 views
0 likes
|
Last Post Today, 07:49 AM | ||
Started by Mindset, Yesterday, 06:19 AM
|
3 responses
17 views
0 likes
|
Last Post Today, 07:44 AM |
Comment