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 08-05-2008, 10:45 PM   #1
duck_CA
Senior Member
 
Join Date: Jan 2008
Location: sacramento CA
Posts: 181
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Yahoo to duck_CA Send a message via Skype™ to duck_CA
Default too many drawing objects

is there a way to filter or keep the drawing objects (triangles in this example) from popping up once the criteria has been met?
maybe another "x amount" of bars required to start drawing again...


if ((High[0] >= SMA(89)[0])
&& (High[
0] >= KeltnerChannel(1.5, 22).Lower[0] + -2 * TickSize)
&& (SMA(
89)[0] <= EMA(22)[0] )
&& (Diff[
1] >= 0)
&& (Stochastics(
5, 3, 3).K[1] <= stokl || Stochastics(5, 3, 3).K[2] <= stokl
|| Stochastics(
5, 3, 3).K[0] <= stokl)
)
DrawTriangleUp(Time[
0].ToString(), 0, Low[1] - 5.25* TickSize, Color.Yellow);
duck_CA is offline  
Reply With Quote
Old 08-06-2008, 01:22 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

you could add a custom flag variable like:
- only draw if condition are met and flag is false
- set flag to true if drawn

-> won't draw again after flag is set
NinjaTrader_Dierk 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
Update of Drawing Objects phylum Charting 7 09-30-2012 11:20 AM
Delete drawing objects cls71 Indicator Development 4 09-26-2008 11:35 AM
Drawing Objects Disappear tommyjames Historical NinjaTrader 6.5 Beta Threads 3 02-26-2008 12:46 PM
Indicator: Drawing unique objects and objects that update NinjaTrader_Josh Reference Samples 0 09-24-2007 09:01 PM
Drawing objects and memory mazachan General Programming 2 08-16-2007 06:58 PM


All times are GMT -6. The time now is 01:07 AM.