Override Plot - how to do FillRectangle in different panel - NinjaTrader Programming | futures io social day trading
futures io futures trading


Override Plot - how to do FillRectangle in different panel
Updated: Views / Replies:1,975 / 11
Created: by sbgtrading Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 3  
 
Thread Tools Search this Thread
 

Override Plot - how to do FillRectangle in different panel

  #1 (permalink)
Elite Member
Chicago
 
Futures Experience: Advanced
Platform: NinjaTrader, MT4, TS
 
Posts: 6 since Mar 2010
Thanks: 3 given, 1 received

Override Plot - how to do FillRectangle in different panel

Looking for how to have a subpanel indicator (with a custom Plot method) perform a graphics.FillRectangle() in the price panel.

Any suggestions?

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received



sbgtrading View Post
Looking for how to have a subpanel indicator (with a custom Plot method) perform a graphics.FillRectangle() in the price panel.

Any suggestions?

Try adding this system bool: DrawOnPricePanel = true; //Just before you need to plot on price panel.

then change to false after plotting on price panel in order to resume plotting in your sub panel.

Hope this helps.

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
 
  #4 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary


sbgtrading View Post
Looking for how to have a subpanel indicator (with a custom Plot method) perform a graphics.FillRectangle() in the price panel.

Any suggestions?

check out this indi https://futures.io/download/ninjatrader-7/indicators/1461-download.html

Reply With Quote
 
  #5 (permalink)
Elite Member
Chicago
 
Futures Experience: Advanced
Platform: NinjaTrader, MT4, TS
 
Posts: 6 since Mar 2010
Thanks: 3 given, 1 received

Thanks for the responses...unfortunately they are not addressing a subtle part of the problem.

Here's a video showing this situation: PlotOverrideRectangleInPricePanel - SBGtrading's library

I'm using the graphics context here, not using Ninja's Draw methods. So setting "DrawOnPricePanel" to true doesn't work when using a graphics.FillRectangle call.

The sample indicator used in the video is attached to this message...if you want something to experiment on.


Again, thanks for your responses...looking for more input from you.

Attached Files
Register to download File Type: cs TestPlotOverride.cs (6.8 KB, 26 views)
Reply With Quote
 
  #6 (permalink)
Elite Member
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received

Sorry, I can't help further as it is beyond my level of knowledge.

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
 
  #7 (permalink)
Market Wizard
Sarasota FL
 
Futures Experience: Intermediate
Platform: NinjaTrader, Sierra Chart
Favorite Futures: ES
 
Posts: 3,635 since Jan 2013
Thanks: 26,755 given, 11,114 received
Forum Reputation: Legendary

Here's a crude method that I think will work, although it is not very elegant.

Let's say your indicator is meant to draw the rectangle on the price panel when condition x exists -- maybe you have a plot in the lower panel, and when x is true, it should draw the rectangle on the price panel.

I've gotten around this kind of problem in the past by writing two indicators. They both perform the same calculation and both know when condition x is true; one of them runs in the lower panel and plots whatever you want to plot there; the second does not do any plotting on the lower panel, but does draw the rectangle (or whatever else you want to see) on the price panel.

So you're doing the same amount of processing work twice, and it's pretty crude, and you've basically just duplicated the same code, but I think it will get you what you want in terms of the final result.

It's also pretty easy and you won't tear your hair out. Hope this works for you.

Bob.

Reply With Quote
 
  #8 (permalink)
Elite Member
Chicago
 
Futures Experience: Advanced
Platform: NinjaTrader, MT4, TS
 
Posts: 6 since Mar 2010
Thanks: 3 given, 1 received


bobwest View Post
I've gotten around this kind of problem in the past by writing two indicators. They both perform the same calculation and both know when condition x is true; one of them runs in the lower panel and plots whatever you want to plot there; the second does not do any plotting on the lower panel, but does draw the rectangle (or whatever else you want to see) on the price panel.

So you're doing the same amount of processing work twice, and it's pretty crude, and you've basically just duplicated the same code, but I think it will get you what you want in terms of the final result.

Thanks for the input, Bob. I've done the same "2-inidicator approach" in the past. I'm just trying to find the "right" way to get around this issue. Afterall, NinjaTrader does it inherently int their Draw methods, so there's got to be a way.

I believe the issue is how to grab the graphics context of the price panel...because it's a different context than the subpanels. One way to do that is to have a price indicator place the Graphics context in a static class, but then again, we're not getting around the 2-indicator coordinated system.

Reply With Quote
The following user says Thank You to sbgtrading for this post:
 
  #9 (permalink)
Market Wizard
Sarasota FL
 
Futures Experience: Intermediate
Platform: NinjaTrader, Sierra Chart
Favorite Futures: ES
 
Posts: 3,635 since Jan 2013
Thanks: 26,755 given, 11,114 received
Forum Reputation: Legendary

Yeah, it seems that there has to be a way. NT doesn't provide much documentation, unfortunately, and this is the kind of thing they don't support.... Maybe in NT8.

Reply With Quote
 
  #10 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary


you may have to translate your coordinates back to DrawRectangle parms.

Attached Files
Register to download File Type: cs TestPlotOverride.cs (7.1 KB, 40 views)
Reply With Quote

Reply



futures io > > > > > Override Plot - how to do FillRectangle in different panel

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
public override void Plot VS multiple dataseries AkLio NinjaTrader Programming 6 November 3rd, 2013 06:15 PM
Chart sound override command protrader007 NinjaTrader Programming 1 July 13th, 2012 06:25 PM
panel condition baberg NinjaTrader Programming 9 September 7th, 2011 02:26 AM
How to override Stoploss generated by a strategy in Superdom puppeye NinjaTrader Programming 9 February 27th, 2010 01:14 AM
Please, I need help with this panel George The Elite Circle 7 August 17th, 2009 04:34 PM


All times are GMT -4. The time now is 10:58 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.12 seconds with 20 queries on phoenix via your IP 54.90.207.75