BollingerBandWidth indicator with up and down colors - NinjaTrader Programming | futures io social day trading
futures io futures trading


BollingerBandWidth indicator with up and down colors
Updated: Views / Replies:693 / 5
Created: by RMorgan Attachments:0

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
 

BollingerBandWidth indicator with up and down colors

  #1 (permalink)
Elite Member
Denver, CO USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Futures (TF, YM)
 
Posts: 15 since Aug 2011
Thanks: 24 given, 37 received

BollingerBandWidth indicator with up and down colors

I'm struggling with trying to modify the BollingerBandWidth indicator to plot green when it's going up and red when it's going down. This admittedly my first time trying to modify an indicator and I have no background in programming.

Any help could be greatly appreciated.

This is the original indicator: https://futures.io/download/ninjatrader-7/indicators/808-download.html?view

Reply With Quote
 
  #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.

 
  #3 (permalink)
Elite Member
Denver, CO USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Futures (TF, YM)
 
Posts: 15 since Aug 2011
Thanks: 24 given, 37 received


I think I found something that will work instead. I'll just do a EMA of 1 and then plot red/green based on the last value. Thanks anyway - I hope nobody wasted too much time.

Reply With Quote
 
  #4 (permalink)
Elite Member
Dallas, TX/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, CL
 
Posts: 46 since Aug 2013
Thanks: 52 given, 6 received

Try this from Fat Tails.
https://futures.io/download/ninjatrader-7/indicators/626-download.html?view

Reply With Quote
The following user says Thank You to KrazyTrader for this post:
 
  #5 (permalink)
Elite Member
Seville, Spain
 
Futures Experience: Beginner
Platform: NinjaTrader + Dendric
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
pintope's Avatar
 
Posts: 17 since May 2014
Thanks: 5 given, 9 received

Hello @RMorgan,

Anyway I’ll waste a little time. You add the indicators in the Initialize() method:
protected override void Initialize()
{
Add(ATR(ATRPeriod));
Add(EMA(EMAPeriod));
Add(Bollinger(numStdDev, BPeriod));

}
In order to set colours, you reference indicators by “this.Indicators” collection in the same order you added them. If the indicator has several lines, you reference them by “this.Indicators[N].Plots” collection. Have a look:
this.Indicators[0].Plots[0].Pen.Color = Color.FromArgb(R, G, B); // ATR
this.Indicators[1].Plots[0].Pen.Color = Color.FromArgb(R, G, B); // EMA
this.Indicators[2].Plots[0].Pen.Color = Color.FromArgb(R, G, B); // Bollinger 1
this.Indicators[2].Plots[1].Pen.Color = Color.FromArgb(R, G, B); // Bollinger 2
this.Indicators[2].Plots[2].Pen.Color = Color.FromArgb(R, G, B); // Bollinger 3
I’m not sure but I think “this.Indicators[2].Plots[0]” corresponds to middle Bollinger band, “this.Indicators[2].Plots[1]” to upper band and ““this.Indicators[2].Plots[2]” to lower band.

Reply With Quote
The following user says Thank You to pintope for this post:
 
  #6 (permalink)
Elite Member
Seville, Spain
 
Futures Experience: Beginner
Platform: NinjaTrader + Dendric
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
pintope's Avatar
 
Posts: 17 since May 2014
Thanks: 5 given, 9 received

I should also like to add that the “decoration” can take place in the indicator itself or in the strategy. In the former case you have to change the indicator code, so you have to create and maintain a new version (or several). In the latter case you do it in the strategy.

It depends on the circumstances, in both cases you add one or two lines of code. I tend to decorate in the strategy, it’s more flexible.

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

Reply



futures io > > > > > BollingerBandWidth indicator with up and down colors

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Very Simple Help Editing RewardRisk V2 Indicator (Changing Colors and Line Size) lllusion The Elite Circle 6 March 30th, 2017 12:53 PM
NT Indicator that would give me colors between 2 functions? tracy NinjaTrader 2 March 18th, 2014 01:20 PM
Indicator Based Upon Other Indicator Colors ScorpioTravis NinjaTrader Programming 12 June 21st, 2012 07:29 PM
HMA Colors Indicator keepdchange NinjaTrader 9 October 6th, 2009 01:53 AM


All times are GMT -4. The time now is 04:44 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-15 in 0.10 seconds with 19 queries on phoenix via your IP 54.234.255.29