Plot images in strategy chart - NinjaTrader Programming | futures.io
futures.io futures trading


Plot images in strategy chart
Started: by jtorres Views / Replies:153 / 5
Last Reply: Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

Plot images in strategy chart

  #1 (permalink)
Elite Member
Madrid - SPain
 
Futures Experience: Beginner
Platform: Ninjatrader
Favorite Futures: CL Future
 
Posts: 9 since Sep 2013
Thanks: 2 given, 0 received

Plot images in strategy chart

Hi verybody!

Please, I need help with a code.
I need to show an image or other into a strategy chart depends a variable value while the strategy price are moving.
As we cant use "public override void Plot()" function in strategy charts i am adding a external indicator in Initialize function, but how could I hide and show this images from strategy onBarUpdate function?

Thank you very much !


Indicator code...

public override void Plot(Graphics graphics, Rectangle bounds, double min, double max){

graphics.DrawImage(myImg,0,0);

}

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
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, CL, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 1,656 since Sep 2013
Thanks: 1,219 given, 2,499 received
Forum Reputation: Legendary


If you draw an object in NT and give it a name, you can then remove it again as if the condition is no longer valid.

1) named obectrs :

Draw a rectangle :
DrawRectangle ("Ubox1", showScaled, barsago, Low, 0, High, Color.Red, Color.Red, 2);

Remove this rectangle :
RemoveDrawObject ("Ubox1");

2) In your case, if you draw with graphics.Drawimg, you need to repaint the hole screen, this can be
done with : ChartControl.Refresh();
but the screen might flicker

good luck

Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #4 (permalink)
Elite Member
Madrid - SPain
 
Futures Experience: Beginner
Platform: Ninjatrader
Favorite Futures: CL Future
 
Posts: 9 since Sep 2013
Thanks: 2 given, 0 received

Thanks rleplae

I dont want to destroy or remove the image objects.
I need to show or hide this created images several times depending a variable value.

Some ideas? Thanks

Reply With Quote
 
  #5 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, CL, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 1,656 since Sep 2013
Thanks: 1,219 given, 2,499 received
Forum Reputation: Legendary

Futures Edge on FIO

Which products do you trade?

 
Do you need to have an image or if the built-in shapes/text are sufficient ,
then i would recommend de first way, draw and remove if needed

Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #6 (permalink)
Elite Member
Madrid - SPain
 
Futures Experience: Beginner
Platform: Ninjatrader
Favorite Futures: CL Future
 
Posts: 9 since Sep 2013
Thanks: 2 given, 0 received

Thanks again rleplae

I want load 2 images and hidde or show when i need, but if its not possible... how could i code the built-in shapes/text

Reply With Quote

Reply



futures.io > > > > > Plot images in strategy chart

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

2016 True Edge Awards: Voting is open until Jan 21!

Now
 

An Afternoon with FIO member Massive l

Elite only
 

Anthony Drager: Pulling the trigger with confidence

Elite only
 

Leo Murphy: The Art and Science of Technical Analysis

Elite only
 

FuturesTrader71: Ask Me Anything

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Expose indicator plot on VitVWAP for strategy stoicbuddha NinjaTrader Programming 5 January 20th, 2016 09:39 PM
MA slope without a Chart or Plot vantojo NinjaTrader Programming 11 March 29th, 2015 08:16 PM
Remove plot from chart haonkered EasyLanguage Programming 7 December 15th, 2014 04:45 PM
plot yesterdays value on todays chart O66NL NinjaTrader 1 May 16th, 2013 05:25 PM
Sierra Chart plot bid, ask, last Big Mike Sierra Chart 4 August 18th, 2012 01:48 AM


All times are GMT -4. The time now is 08:14 PM.

no new posts
Page generated 2017-01-18 in 0.09 seconds with 20 queries on phoenix via your IP 184.73.21.101