Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Brush filling

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    The problem had to do with the post I put in just as yours came in. There was nothing wrong with the coding of the DrawRegion all along. It was something else altogether.

    That said, thanks for exaplaining about the stochastic spread. I missed that Opacity of 0 would mean that it didn't display. In any case, it's now working fine, pic attached.

    Not that this is vitally important - again learning how to code is more the point here - but the idea behind this was to highlight the trading range (between the Donchians) once it narrows without coloring the entire screen so as to a) keep the overall trend in mind visually and b) highlight the specific range area and also c) if that range is protracted and starts narrowing, this will show clearly on the chart so the breakout levels become more pronounced than when the entire screen is (in my case) pink.

    Thanks to all.

    Have now attached Donchian only version soon in case anyone else would find this of interest/helpful. Also pic showing this indicator alone in action.
    Attached Files
    Last edited by cclsys; 08-18-2009, 10:38 AM.

    Comment


      #17
      Great you have it figured out cclsys!

      Comment


        #18
        Originally posted by NinjaTrader_Bertrand View Post
        Great you have it figured out cclsys!

        Thank you, Bernard, for helping me to figure it out. In retrospect I should have looked harder for Draw Region to start with. But since the filling code I had in a couple of different indicators used 100+ line brush commands, I just assumed no such method existed. I suspect it didn't when these codes were written.

        Then I am still not sure what I was doing wrong when it painted all the time, but once you gave me a good sample, I I didn't pay proper attention to log errors to determine that the problem was not with the Drawline lingo but elsewhere.

        Interesting that your StdError bands (impressive Lin Reg coding from scratch on your part) worked fine without the CurrentBar < X condition before, but with the condition added to DrawRegion it became a deal (or I should say code) breaker.

        Anyway, thanks again.

        Comment


          #19
          cclsys, you're welcome - any time you attempt to access bars not present in the data series objects this error would surface, so this tip will be helpful - http://www.ninjatrader-support2.com/...ead.php?t=3170

          My code did not attempt to do this, while your conditions did > just always an individual scenario.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          612 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          355 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          561 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          564 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X