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 Tasker_182 with 1 posts (2 thanks)
    3. looks_3 edsall with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,200 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread
  #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 X Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strategy runs differently with in Automated Order Execut …
MultiCharts
New York Stock Exchange to Launch NYSE Texas
Stocks and ETFs
My funded futures (mffu)
Funded Trading Evaluation Firms
How to look up market depth?
MultiCharts
Half-life over Cointegration?
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tariffs and what comes next...
13 thanks
$TRUMP Crypto coin: Facts, Legality, and Controversies
7 thanks
For DOM based traders. (ES/NQ)
6 thanks
My hunt for the Automated Holy Grail
4 thanks
For DOM based traders. (ES/NQ)
3 thanks
  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,728 since Jul 2012
Thanks Given: 1,913
Thanks Received: 7,454



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 X 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 X Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #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,404


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
Thanked by:
  #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 X Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #7 (permalink)
 edsall 
Montclair, NJ
 
Experience: Intermediate
Platform: NT 8
Trading: Index Futures
Posts: 16 since Nov 2013
Thanks Given: 0
Thanks Received: 1

Can somebody help with this: create indicator that generates output such as: triangle object up = +1, triangle object down = -1, no triangle = 0.

Thanks.


Reply With Quote




Last Updated on December 26, 2024


© 2025 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 - Downloads - Top
no new posts