NexusFi: Find Your Edge


Home Menu

 





Help with paintbar code.


Discussion in NinjaTrader

Updated
    1. trending_up 2,478 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Help with paintbar code.

  #1 (permalink)
bfreefalling
arroyo grande calif
 
Posts: 1 since Mar 2011
Thanks Given: 0
Thanks Received: 0

I'm new at this and trying to learn how to write script.

Would like an example of how to write a paintbar indicator (candle or OHLC) for the following:

2 CCI indicators one being a period of 5 and another being a period of 20 as examples.

The 20 period CCI closing in between the -50 and +50 areas and a spread of 100 or greater between its closing number and the CCI 5 period closing number (example cci 20 being +45 and the CCI 5 being -55 or greater).

I would like the PRICE bar that follows after this occurance to paint a different color if it's closing price is lower (or higher depending on the direction of the movement) indicating a potential pivot.

thank you so much.
Dave

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Futures True Range Report
The Elite Circle
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
 
  #3 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435


you can set BackColor, BarColor, and CandleOutlineColor based on your trigger criteria.

here's a link to the NT7 Help Guide

also, if you are going to allow the users to select a color, don't forget to serialize it ... here's a code-snippet to illustrate:

 
Code
        [XmlIgnore()]
        [Description("Select the color")]
        public Color MyColor
        {
            get { return _MyColor; }
            set { _MyColor = value; }
        }
        [Browsable(false)]
        public string MyColor_Serialize
        {
            get { return NinjaTrader.Gui.Design.SerializableColor.ToString(_MyColor); }
            set { _MyColor = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }
        }
        private Color _MyColor = Color.Blue;
cheers,
-e

Reply With Quote
Thanked by:




Last Updated on April 28, 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