NexusFi: Find Your Edge


Home Menu

 





Plot inside BOX


Discussion in NinjaTrader

Updated
    1. trending_up 1,901 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 humy65 
Haifa/Israel
 
Experience: Beginner
Platform: NinjaTrader
Trading: Stocks
Posts: 15 since Mar 2012
Thanks Given: 3
Thanks Received: 2

I would like to plot inside the boxes created by the Box chart style.

Is there any (undocumented) hook ?


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117



humy65 View Post
I would like to plot inside the boxes created by the Box chart style.

Is there any (undocumented) hook ?

You can do this with an indicator that uses a custom plot.


Reply With Quote
  #4 (permalink)
 humy65 
Haifa/Israel
 
Experience: Beginner
Platform: NinjaTrader
Trading: Stocks
Posts: 15 since Mar 2012
Thanks Given: 3
Thanks Received: 2


Fat Tails View Post
You can do this with an indicator that uses a custom plot.

How do I determine the rectangle (the BOX) of the current bar to paint inside ?


Started this thread Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


humy65 View Post
How do I determine the rectangle (the BOX) of the current bar to paint inside ?

You need to determine x and y coordinates of the box within the chart. x values are plotted from the left to the right, y values are plotted from top to bottom.

left x-coordinate: midpoint of bar - 0.5 bar width
right x-coordinate: midpoint of bar + 0.5 bar width
upper end of the box: y-coordinate corresponding to bar high
lower end of the box: y-coordinate corresponding to bar low

These are the NinjaScript commands that you can use:

bar midpoint: ChartControl.GetXByBarIdx(BarsArray[0], idx)
bar width: Bars.BarsData.ChartStyle.BarWidth
bar high: ChartControl.GetYByValue(this, High.Get(idx))
bar low: ChartControl.GetYByValue(this, Low.Get(idx))

where idx is the index of the bar.


Reply With Quote
Thanked by:
  #6 (permalink)
 humy65 
Haifa/Israel
 
Experience: Beginner
Platform: NinjaTrader
Trading: Stocks
Posts: 15 since Mar 2012
Thanks Given: 3
Thanks Received: 2

Happy! Made it work.

Thanks much.


Started this thread Reply With Quote
Thanked by:




Last Updated on May 17, 2013


© 2026 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