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


Plot images in strategy chart
Updated: Views / Replies:214 / 5
Created: by jtorres 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, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 1,969 since Sep 2013
Thanks: 1,386 given, 2,949 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, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 1,969 since Sep 2013
Thanks: 1,386 given, 2,949 received
Forum Reputation: Legendary

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)

FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May
 

EasyLanguage ABC's: Mastering TradeStation Programming w/Chris Kaiser

Elite only
 

Prototyping Python Strategies (part 2: Backtesting) w/Ran Aroussi [special time: 1PM ET]

Elite only
 

Portfolio Diversification w/Brendon Delate @ Diversify Portfolio

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

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 08:39 PM
MA slope without a Chart or Plot vantojo NinjaTrader Programming 11 March 29th, 2015 07:16 PM
Remove plot from chart haonkered EasyLanguage Programming 7 December 15th, 2014 03:45 PM
plot yesterdays value on todays chart O66NL NinjaTrader 1 May 16th, 2013 04:25 PM
Sierra Chart plot bid, ask, last Big Mike Sierra Chart 4 August 18th, 2012 12:48 AM


All times are GMT -4. The time now is 03:17 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-05-23 in 0.10 seconds with 19 queries on phoenix via your IP 54.224.200.104