NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-19-2009, 02:17 PM   #1
123r34
Member
 
Join Date: Dec 2007
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
Default Programming a Pullback

I am having a problem programming the Strategy Wizard and would appreciate some suggestions. I am using a 200 SMA as a trendline and that is programmed in correctly. In an uptrend I would like to buy when the price on the ES pulls back(goes down)16ticks.
What is the Strategy Wizard programming to buy when the price backs up 16 ticks?

Thank you
Mark
123r34 is offline  
Reply With Quote
Old 02-19-2009, 02:24 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Mark,

You would need to first outline more details as to what you want. You want to have the pull back from what point exactly?
NinjaTrader_Josh is offline  
Reply With Quote
Old 02-19-2009, 03:05 PM   #3
123r34
Member
 
Join Date: Dec 2007
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
Default Pullback

Hello Josh,

I was hoping the Strategy Wizard was capable of doing an entry when the price pulled back (16 ticks example) from the last high. Less desirable would be a 16 tick pull back in as an example, 10 bars back. I am just looking to buy pullbacks in an uptrend. The uptrend/downtrend filter using a long term SMA was easy. I want to buy pullbacks against those trends.

Thanks for any ideas you have
123r34 is offline  
Reply With Quote
Old 02-19-2009, 03:10 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Try this in the Condition Builder:

On the left, select Indicator->MAX. In the bottom left Parameters, select "Input series" and select Price->High. Set the period to how many bars you want to check back for the highest high. In "Offset", type in -16. Make sure the offset mode is set to Ticks.

On the right, select Price->Close. barsAgo = 0.

In the middle, select <=.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I do this without programming a strategy? cunparis ATM Strategies (Discretionary Trading) 2 02-17-2009 07:12 AM
Programming help kipper General Programming 3 12-14-2008 12:12 AM
pullback code in Ninjascript newtonslab Indicator Development 10 10-09-2008 07:41 AM
Programming question sauer11155 General Programming 3 09-02-2008 11:34 AM
Stochastic Programming tomydispik General Programming 3 08-08-2008 09:39 AM


All times are GMT -6. The time now is 02:38 PM.