modifying bollinger bands - NinjaTrader Programming | futures io social day trading
futures io futures trading


modifying bollinger bands
Updated: Views / Replies:1,121 / 11
Created: by r68cervera Attachments:4

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

modifying bollinger bands

  #1 (permalink)
Trading Apprentice
spain
 
Futures Experience: Beginner
Platform: ninjatrader
 
Posts: 7 since Jun 2010
Thanks: 3 given, 0 received

modifying bollinger bands

Hello, I am trying to develop a system based on bollinger bands indicator, but I need the upper band is calculated with maximum candle, the lower band with minimal candle and center with SMA.
I have written the following code, but I see that the result is not correct, I still figuring everything with the closing price of the candle

what is wrong ???
any help will be appreciated
thx

public class bollingerfelipenuevo : Indicator
{
#region Variables
private double numStdDev = 2;
private int period =14;

#endregion

/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Orange, "Upper band"));
Add(new Plot(Color.Orange, "Middle band"));
Add(new Plot(Color.Orange, "Lower band"));

Overlay = true;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
double smaValue = SMA(Period)[0];
double smaHIGH = SMA(High,Period)[0];
double smaLOW = SMA(Low,Period)[0];
double stdDevValue = StdDev(Period)[0];
Upper.Set(smaHIGH + NumStdDev * stdDevValue);
Middle.Set(smaValue);
Lower.Set(smaLOW - NumStdDev * stdDevValue);
}
#region Properties
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Lower
{
get { return Values[2]; }
}
/// Get the middle value.
/// <summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries Middle
{
get { return Values[1]; }
}
/// </summary>
/// Get the upper value.
/// <summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries Upper
{
get { return Values[0]; }
}
/// </summary>
[Description("Number of standard deviations")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("# of std. dev.")]
public double NumStdDev
{
get { return numStdDev; }
set { numStdDev = Math.Max(0, value); }
}

/// <summary>
[Description("Numbers of bars used for calculations")]
[GridCategory("Parameters")]
public int Period
{
get { return period; }
set { period = Math.Max(1, value); }
}
/// </summary>
#endregion
}
}

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
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


Please post a chart with the indicator applied and explain what is not correct and why it is not correct.

There are different solutions possible.

For example you can calculate the standard deviation from the closes, highs or lows.

All depends on what you try to achieve or which system you try to imitate.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
spain
 
Futures Experience: Beginner
Platform: ninjatrader
 
Posts: 7 since Jun 2010
Thanks: 3 given, 0 received

Hello fat tails thanks for your interest in my question
I need the following:
the upper band is calculated by the maximum of the candle
the middle band is calculated by the closing price
the lower band is calculated by the low Candle



Because it is not correct ???
because I work with Visual Chart, and visual indicator that brings bollinger bands these options you can configure the way you like, and are implemented, and the result is not the same

Reply With Quote
 
  #5 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


r68cervera View Post
Hello fat tails thanks for your interest in my question
I need the following:
the upper band is calculated by the maximum of the candle
the middle band is calculated by the closing price
the lower band is calculated by the low Candle



Because it is not correct ???
because I work with Visual Chart, and visual indicator that brings bollinger bands these options you can configure the way you like, and are implemented, and the result is not the same

If the result is not the same, please post a chart produced with Visual Chart and another one made with NinjaTrader and explain the difference. I cannot help without the relevant information.

Maybe, you are not yet allowed to post screenshots, as you have less than 5 posts. Just be patient.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #6 (permalink)
Trading Apprentice
spain
 
Futures Experience: Beginner
Platform: ninjatrader
 
Posts: 7 since Jun 2010
Thanks: 3 given, 0 received

ok fat
I will try to upload a graphic of the two platforms so you can see the difference
Thanks for your interest

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
spain
 
Futures Experience: Beginner
Platform: ninjatrader
 
Posts: 7 since Jun 2010
Thanks: 3 given, 0 received

I will upload the first graphic visual chart

Attached Thumbnails
modifying bollinger bands-visualchart.png  
Reply With Quote
 
  #8 (permalink)
Trading Apprentice
spain
 
Futures Experience: Beginner
Platform: ninjatrader
 
Posts: 7 since Jun 2010
Thanks: 3 given, 0 received

ninja trader

Attached Thumbnails
modifying bollinger bands-ninja.png  
Reply With Quote
 
  #9 (permalink)
Trading Apprentice
spain
 
Futures Experience: Beginner
Platform: ninjatrader
 
Posts: 7 since Jun 2010
Thanks: 3 given, 0 received

ninja trader date 26/01/2015 time 9:50

upper band 10676.4 blue line
middle.band 10625.9 green line
low.band 10575.1 red line


visual chart date 26/01/2015 time 9:50

upper band 10677.6 blue line
middle band 10626 green line
low band 10576 red line


in visual chart, let me set automatically close , high, low, open, in ninja I have only close

Reply With Quote
 
  #10 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,215 since Jun 2009
Thanks: 628 given, 6,311 received



r68cervera View Post


in visual chart, let me set automatically close , high, low, open, in ninja I have only close

you select O,H,C thru indicator setting

Attached Thumbnails
modifying bollinger bands-2015-01-28_0803.png  
Reply With Quote
The following user says Thank You to cory for this post:

Reply



futures io > > > > > modifying bollinger bands

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
Bollinger Bands with Color JasonX NinjaTrader 15 April 29th, 2016 03:57 AM
Bollinger Bands about EMA DMC123 NinjaTrader 1 July 11th, 2013 04:18 PM
Price Action with Bollinger Bands Saroj The Elite Circle 36 March 18th, 2012 08:12 AM
MACD with Bollinger bands for IRT trendisyourfriend Investor/RT 11 May 16th, 2011 04:04 PM
Bollinger Bands MWinfrey Traders Hideout 8 February 8th, 2011 08:02 AM


All times are GMT -4. The time now is 03:50 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.13 seconds with 20 queries on phoenix via your IP 54.226.113.250