NexusFi: Find Your Edge


Home Menu

 





How to Detect Square or Arrow in Chart


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one westsider with 3 posts (1 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 kevinkdog with 1 posts (0 thanks)
    4. looks_4 Tasker_182 with 1 posts (2 thanks)
    1. trending_up 2,923 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

How to Detect Square or Arrow in Chart

  #1 (permalink)
 
westsider's Avatar
 westsider 
St Louis, MO
 
Experience: Intermediate
Platform: Ninjatrader TOS Jigsaw
Broker: Ninjatrader
Trading: MES
Posts: 114 since Jun 2011
Thanks Given: 55
Thanks Received: 127

I have a 3rd party indicator that I would like to make strategy entries from. It does not generate plots or and bool conditions just a DrawSquare object on the chart. I know its possible to detect these. Does anyone know how?
Thanks
Westsider

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
55 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 thanks

  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,336



westsider View Post
I have a 3rd party indicator that I would like to make strategy entries from. It does not generate plots or and bool conditions just a DrawSquare object on the chart. I know its possible to detect these. Does anyone know how?
Thanks
Westsider

I assume the code is locked. Why not ask the developer for assistance?

Follow me on Twitter Reply With Quote
  #4 (permalink)
 
westsider's Avatar
 westsider 
St Louis, MO
 
Experience: Intermediate
Platform: Ninjatrader TOS Jigsaw
Broker: Ninjatrader
Trading: MES
Posts: 114 since Jun 2011
Thanks Given: 55
Thanks Received: 127

The code is locked - as it should be. I contacted the developer. They said there were no plans to offer any plots in the future.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following user says Thank You to westsider for this post:
  #5 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,401


westsider View Post
I have a 3rd party indicator that I would like to make strategy entries from. It does not generate plots or and bool conditions just a DrawSquare object on the chart. I know its possible to detect these. Does anyone know how?
Thanks
Westsider

Not sure if this will meet your needs but from the Ninja help file:

NinjaScript > Language Reference > Drawing >

DrawObjects



Definition
A collection holding all of the draw objects on the chart for the primary bar series. The draw objects can be manually drawn or script generated objects.



Property Value

A collection of IDrawObject objects.



Syntax

DrawObjects

DrawObjects[string tag]

DrawObjects.Count






Examples

// Example #1: Finding the draw object of a specific tag

protected override void OnBarUpdate()

{

if (DrawObjects["someTag"] != null && DrawObjects["someTag"].DrawType == DrawType.Line)

{

// Do something

}

}



// Example #2: Number of draw objects on a chart

protected override void OnBarUpdate()

{

if (DrawObjects.Count == 3)

{

// Do something

}

}



// Example #3: Looping through the collection to find specific draw objects

protected override void OnBarUpdate()

{

// Loops through the DrawObjects collection

foreach (IDrawObject draw in DrawObjects)

{

// Finds line objects that are attached globally to all charts of the same instrument

if (draw.Tag.StartsWith("@") && draw is ILine)

{

ILine globalLine = (ILine) draw;



// Changes the line color and prints its starting and end points

globalLine.Pen.Color = Color.Black;

Print("Start: " + globalLine.StartBarsAgo + " End: " + globalLine.EndBarsAgo);

}



// Finds non-global line objects

else if (draw is ILine)

{

ILine drawnLine = (ILine) draw;



// Determines if this is a manually drawn or script generated line

Print("Line Object: " + draw.Tag + " Manually Drawn: " + draw.UserDrawn);

}

}

}

Be yourself; everyone else is already taken. Oscar Wilde
Reply With Quote
The following 2 users say Thank You to Tasker_182 for this post:
  #6 (permalink)
 
westsider's Avatar
 westsider 
St Louis, MO
 
Experience: Intermediate
Platform: Ninjatrader TOS Jigsaw
Broker: Ninjatrader
Trading: MES
Posts: 114 since Jun 2011
Thanks Given: 55
Thanks Received: 127

WOW! - Very helpful. I will chew through these options today - Thanks very much @Tasker_182
I didn't see this in the help section

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote





Last Updated on September 11, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts