NexusFi: Find Your Edge


Home Menu

 





Plot inside BOX


Discussion in NinjaTrader

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




 
Search this Thread

Plot inside BOX

  #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?
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



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
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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


© 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