NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 03-30-2008, 09:21 AM   #1
nico_p
Member
 
Join Date: Mar 2008
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default Modifying NinjatraderPriceAction indicator

I need Some help modifying the NinjaPriceAction indicator created by TraderGuy ( thx for providing this indicator)
found here : http://www.ninjatrader-support.com/v...ead.php?t=5689


I want the indicator to draw a
HL
ONLY when the swing low is > previous swing high
LH
ONly when the swing high < previous swing low

I used TraderGuy's indicator as a base and stripped it to my needs, and I almost got it working as i want

My problem here is how do I reference to the previous swing high/low instead of referencing to a lookback period (x-nr of bars)

in this line of code :
barsback = Swing(strength).SwingHighBar(0,2,lookback);

Your help is much appreciated

Nico
Attached Images
File Type: png MypriceAction.png (50.6 KB, 166 views)
Attached Files
File Type: zip MyPriceAction.zip (9.8 KB, 27 views)
Last edited by nico_p; 03-30-2008 at 09:24 AM.
nico_p is offline  
Reply With Quote
Old 03-30-2008, 01:15 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

As a last resort you can try contacting one of the NinjaScript Consultants here: http://www.ninjatrader.com/webnew/pa...injaScript.htm

barsback = Swing(strength).SwingHighBar(0,2,lookback);
For the lookback use CurrentBar. It will lookback through the whole set, but return the previous swing high bar.
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
Dynamically Modifying SetStopLoss() whitmark Strategy Development 6 10-13-2008 12:17 PM
Indicator: Removing and Custom Formatting an Indicator’s Chart Label NinjaTrader_Josh Reference Samples 0 12-30-2007 06:49 PM
Howard Indicator and Pesavento Pattern Swing Indicator DORAIRAJ_S@HOTMAIL.COM Indicator Development 1 11-12-2007 12:28 AM
Strategy: Modifying the price of stop loss and profit target orders NinjaTrader_Josh Reference Samples 0 09-06-2007 12:46 PM
modifying an existing NT6 indicator bmaltz Indicator Development 2 05-02-2007 11:53 AM


All times are GMT -6. The time now is 12:40 AM.