NexusFi: Find Your Edge


Home Menu

 





Using Draw Methods to Plot to the Future Part of the Chart


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Tempo with 3 posts (0 thanks)
    2. looks_two Fat Tails with 2 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (1 thanks)
    1. trending_up 3,531 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

Using Draw Methods to Plot to the Future Part of the Chart

  #1 (permalink)
Tempo
Los Angeles
 
Posts: 8 since Feb 2011
Thanks Given: 4
Thanks Received: 0

I have a few projective approaches I'd like to test, projective in the way Fibonacci & Gann techniques are. They attempt to identify time & price points in the future that are of interest. The NinjaScript OnBarUpdate() method seems to prohibit programmatically drawing objects or plotting indicators to the future part of the chart, of whatever bar is being currently calculated. One can manually place rectangles and ellipses anywhere one desires, including the future area of the chart. Is there a way to programmatically place drawing objects to the future side (to the right) of whatever bar is being calculated, including the bar being created "now"?

I have seen some stuff on overriding the plot() method. Can that be used to programmatically draw the draw object methods like DrawRectangle(), DrawEllipse() on the future side of the chart, or does this only work for price-derivative indicators like MACD or RSI? And, does that require translating back and forth between time/price and X/Y coordinates?

Can the draw object methods themselves be overridden, so that they can take negative values for their x-axis/bars back values? They would then plot to the future. I prefer to stay with draw object methods if at all possible due to the simplicity of the arguments that they take, prices, numbers of bars, etc.

Thanks,
Tempo

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
About a successful futures trader who didnt know anythin …
Psychology and Money Management
How to apply profiles
Traders Hideout
 
  #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,103



Tempo View Post
I have a few projective approaches I'd like to test, projective in the way Fibonacci & Gann techniques are. They attempt to identify time & price points in the future that are of interest. The NinjaScript OnBarUpdate() method seems to prohibit programmatically drawing objects or plotting indicators to the future part of the chart, of whatever bar is being currently calculated. One can manually place rectangles and ellipses anywhere one desires, including the future area of the chart. Is there a way to programmatically place drawing objects to the future side (to the right) of whatever bar is being calculated, including the bar being created "now"?

I have seen some stuff on overriding the plot() method. Can that be used to programmatically draw the draw object methods like DrawRectangle(), DrawEllipse() on the future side of the chart, or does this only work for price-derivative indicators like MACD or RSI? And, does that require translating back and forth between time/price and X/Y coordinates?

Can the draw object methods themselves be overridden, so that they can take negative values for their x-axis/bars back values? They would then plot to the future. I prefer to stay with draw object methods if at all possible due to the simplicity of the arguments that they take, prices, numbers of bars, etc.

Thanks,
Tempo


I have at least in one case used a DrawText() method and entered a negative value for the BarsAgo parameter. This worked as the text was plotted to the right of the current bar.

Just try and see what happens.

Reply With Quote
Thanked by:
  #4 (permalink)
Tempo
Los Angeles
 
Posts: 8 since Feb 2011
Thanks Given: 4
Thanks Received: 0

Wow, Fat Tails,
That's the first time I've heard of that working. I have tried it with a rectangle before, but it did not work at the time. What version and build were you on? Tomorrow I will have time to code a test. If it works on NT7 (which is new to me) I will be thrilled, really.
Thanks for your quick reply,
Tempo

P.S. Confirmation or thoughts from others is welcome, too.

Reply With Quote
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,464 since Jun 2009
Thanks Given: 33,242
Thanks Received: 101,662


Fat Tails View Post
I have at least in one case used a DrawText() method and entered a negative value for the BarsAgo parameter. This worked as the text was plotted to the right of the current bar.

Just try and see what happens.

I believe it was added in NT7.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #6 (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,103


Big Mike View Post
I believe it was added in NT7.

Mike

I have used it in that Relative Volume indicator. It plots the info at position -1 to the right of the last bar of the histogram.
You can check the code.

Reply With Quote
  #7 (permalink)
Tempo
Los Angeles
 
Posts: 8 since Feb 2011
Thanks Given: 4
Thanks Received: 0

Fat Tails, Mike,

Yep. Didn't work in NT6.5 (so that's why I asked), and it now works in NT7, which is great for what I'm trying to do. Thank you guys for your help.

Best,
Tempo

Reply With Quote




Last Updated on February 24, 2011


© 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