Help with paintbar code. - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Help with paintbar code.
Started:April 27th, 2011 (05:50 PM) by bfreefalling Views / Replies:991 / 2
Last Reply:April 28th, 2011 (09:54 AM) Attachments:0

Welcome to

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

Thread Tools Search this Thread

Help with paintbar code.

Old April 27th, 2011, 05:50 PM   #1 (permalink)
Just starting out...
arroyo grande calif
Futures Experience: Advanced
Platform: Ninjatrader, TOS
Favorite Futures: Futures, Equities
Posts: 1 since Mar 2011
Thanks: 0 given, 0 received

Help with paintbar code.

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.

Reply With Quote

Old April 27th, 2011, 05:50 PM   #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.


Old April 28th, 2011, 09:54 AM   #3 (permalink)
Galveston ,TX
Futures Experience: Intermediate
Platform: NT7
Broker/Data: Zaner
Favorite Futures: Futures
Posts: 386 since Mar 2010
Thanks: 364 given, 431 received

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:

        [Description("Select the color")]
        public Color MyColor
            get { return _MyColor; }
            set { _MyColor = value; }
        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;

Reply With Quote
The following user says Thank You to eman for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Help with paintbar code.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
PaintBar Factory ntsst3 Vendors and Product Reviews 74 July 30th, 2015 12:55 PM
Paintbar for SMI2 TraderAZ NinjaTrader 2 August 22nd, 2009 12:08 AM
New Paintbar 4 Shortterm wh NinjaTrader Programming 2 July 3rd, 2009 04:04 AM

All times are GMT -4. The time now is 05:07 AM.

Copyright © 2016 by 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 2016-10-27 in 0.06 seconds with 19 queries on phoenix via your IP