Plot override anchoring problem - NinjaTrader | futures io social day trading
futures io futures trading


Plot override anchoring problem
Updated: Views / Replies:743 / 4
Created: by gregid Attachments:1

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
 
Thread Tools Search this Thread
 

Plot override anchoring problem

  #1 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received

Plot override anchoring problem

I am working on the indicator (attached) based on some existing ones (eg. TRO_PMSM_Trend). The values are some abstract SMA conditions that are unimportant to the problem with display.

Unfortunately the way it behaves at the moment doesn't make much sense to me. The strange behavior is visible the most when refreshing the chart from the leftmost end. After refresh when you scroll the chart to the right the dots are not anchored to the data (float over chart and remain the same). When scrolling to the left it finally generates new dots (although not anchored to the right bars). Scrolling to the right again it remembers all generated dots until reaching the rightmost point we visited before when it floats again. At no point it anchors the dots correctly

I am out of ideas, please advise.

Here is a screencast (with a link just in case embedding doesn't work)
Anchoring Problem - screencast
Error retrieving image, please check URL again

Attached Files
Register to download File Type: zip g3SignalDots.zip (4.9 KB, 18 views)
Reply With Quote
 
  #2 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received


gregid View Post
I am working on the indicator (attached) based on some existing ones (eg. TRO_PMSM_Trend). The values are some abstract SMA conditions that are unimportant to the problem with display.

Unfortunately the way it behaves at the moment doesn't make much sense to me. The strange behavior is visible the most when refreshing the chart from the leftmost end. After refresh when you scroll the chart to the right the dots are not anchored to the data (float over chart and remain the same). When scrolling to the left it finally generates new dots (although not anchored to the right bars). Scrolling to the right again it remembers all generated dots until reaching the rightmost point we visited before when it floats again. At no point it anchors the dots correctly

I am out of ideas, please advise.

Here is a screencast (with a link just in case embedding doesn't work)
Anchoring Problem - screencast
Error retrieving image, please check URL again

One my our CSR's sent me this for you to try, if this does not work please follow up in our support forum.

I believe he simply needs to call IsValidPlot like we do in ZigZag to ensure the indicator plot is in sync with the last bar processed. This at least fixed his error scenario on my end…

public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
{
if (Bars == null || ChartControl == null)
return;

IsValidPlot(Bars.Count - 1 + (CalculateOnBarClose ? -1 : 0)); // make sure indicator is calculated until last (existing) bar

// rest of plot logic...
}

Reply With Quote
The following 2 users say Thank You to NinjaTrader for this post:
 
  #3 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received



NinjaTrader View Post
One my our CSR's sent me this for you to try, if this does not work please follow up in our support forum.

I believe he simply needs to call IsValidPlot like we do in ZigZag to ensure the indicator plot is in sync with the last bar processed. This at least fixed his error scenario on my end…

public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
{
if (Bars == null || ChartControl == null)
return;

IsValidPlot(Bars.Count - 1 + (CalculateOnBarClose ? -1 : 0)); // make sure indicator is calculated until last (existing) bar

// rest of plot logic...
}

Excellent, thank you! This little change makes all the difference - with dots finally anchored I can debug the rest.

Reply With Quote
 
  #4 (permalink)
Elite Member
Ramey
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: None
Favorite Futures: ES, YM
 
Posts: 24 since Aug 2009
Thanks: 13 given, 6 received

this indicator

Does anyone know what this indicator actually measures.

Reason I say that is I don't know what it does but on the right time frames I don't buy or sell unless this indicator is on extremes.

Reply With Quote
 
  #5 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received


drakebauer View Post
Does anyone know what this indicator actually measures.

Reason I say that is I don't know what it does but on the right time frames I don't buy or sell unless this indicator is on extremes.

That's interesting because I used it only as a shell for development of other indicators and the conditions used were not really designed to do anything specific in terms of trading. But since you've found use for this here is what it does:
It takes SMAs with increasing periods (at dyadic intervals, ie. powers of 2) and if SMA is > Close adds 1 to score if smaller subtracts 1 from score. So the extremes show that most of the SMAs are above or below price. That's it

Reply With Quote

Reply



futures io > > > > Plot override anchoring problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Override Plot - how to do FillRectangle in different panel sbgtrading NinjaTrader Programming 11 December 16th, 2013 11:27 PM
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
Could you help me with this plot??? andaluz NinjaTrader Programming 2 May 30th, 2010 08:54 PM
How to override Stoploss generated by a strategy in Superdom puppeye NinjaTrader Programming 9 February 27th, 2010 01:14 AM


All times are GMT -4. The time now is 03:57 AM.

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-11 in 0.11 seconds with 20 queries on phoenix via your IP 54.226.113.250