Help - how can I use Dataseries wich are calulate by an other Indicator? - NinjaTrader Programming | futures io social day trading
futures io futures trading


Help - how can I use Dataseries wich are calulate by an other Indicator?
Updated: Views / Replies:2,937 / 12
Created: by Trendseek Attachments:5

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

Help - how can I use Dataseries wich are calulate by an other Indicator?

  #11 (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

You are right, I have not answered your original question.

So let us assume that you have a Bollinger indicator BollingerIND that uses a moving average and you want to call this moving average from within your standard deviation indicator StdDevIND. That is pretty simple, just call it:

 
Code
 
double average = BollingerIND(1, Period).Middle[0];
 
// 1 stands for numStdDev which is not required for the average, 
// but expected as input by the method
I had to modify the original Bollinger Band indicator, because for unknown reasons for each of the properties there is a line preventing serialization, so the StdDevIND indicator could not be exported.

 
Code
 
[XmlIgnore()]
Indicators and chart attached.

Attached Thumbnails
Help - how can I use Dataseries wich are calulate by an other Indicator?-stddevind.jpg  
Attached Files
Register to download File Type: zip StdDevIND.zip (7.7 KB, 10 views)
Reply With Quote
 
  #12 (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

Learned something new:


[The XmlIgnore()] has an impact on exporting indicators. If you leave this command in front of a property, the indicator will not be automatically called, when it is exported.

Example: The Bollinger indicator has the [XmlIgnore()] command set for all its DataSeries, as shown below

 
Code
 
/// <summary>
/// Get the middle value.
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries Middle
{
get { return Values[1]; }
}
If another indicator calls Bollinger.Middle, this indicator cannot be exported via File -> Utilities -> Export NinjaScript,

unless

you select Bollinger manually and add it to the file list to be exported.

This behaviour is caused by [XmlIgnore()] for whatever reasons. Referencing of other indicators that do not contain this command is no problem, NinjaTrader will add them automatically when exporting.

File below could be exported by adding Bollinger manually.

Attached Files
Register to download File Type: zip StdDevIND.zip (7.7 KB, 8 views)
Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #13 (permalink)
Elite Member
Leipzig / Germany
 
Futures Experience: Intermediate
Platform: NT / TS, MC and Clones
Broker/Data: Interactive Broker
Favorite Futures: Futures, Forex
 
Posts: 24 since Aug 2009
Thanks: 31 given, 34 received


Hallo Fat Tails
thanks again for your last .cs - files.

this thread become more and more interesting for me....
checking your files gives me some new ideas and questions about visability and accessibility of DataSeries


Your last Indicator (StdDevIND) would be perfect, if I could put the desired Moving-Average-Dataseries in the Statement, which calls the modified StdDev. Something like:

double StdDevValue = StdDevInd(maseries, period);


For my customized Bollinger-Band I use a special Method for that purpose:

 
Code
//Calculate the StdDev for a specific MA-Series
        private double sdvalue (DataSeries maseries, int period)
        {
            if (CurrentBar < period)return 0;            
            double sum = 0;
              //for (int count = 0; count < period  ; count++)
            for (int count = period-1; count >= 0; count --)
            {                    
                double diff = Math.Abs(Input[count] - maseries[0]);
                sum += diff * diff;
            }
            return (Math.Sqrt(sum / period));
        }
Unfortunaly the StdDev shows unexpected behavior:
The Chart shows the "StdDev-Bands" for a SMA (the orange-one) and a "faster" MA (the yellow-one).
I suppose, that the differences between Datas and the MA becomes smaller, by using a faster MA. The opposite is true!

It is nice to playing around with that new anaBollinger - but I personaly think, that the SMA is more or less the best choice for playing with the Bands.


Best
Trendseek

Attached Thumbnails
Help - how can I use Dataseries wich are calulate by an other Indicator?-mad-bollinger.jpg  
Reply With Quote

Reply



futures io > > > > > Help - how can I use Dataseries wich are calulate by an other Indicator?

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
Multiple dataseries Breakout NinjaTrader 28 March 30th, 2015 01:14 PM
How to Export DataSeries from NT to Excel? Fat Tails NinjaTrader Programming 65 April 28th, 2014 12:05 PM
Need help with order entry on multiple dataseries bobbakerr EasyLanguage Programming 20 August 29th, 2010 10:03 AM
Redeclaring a dataseries to use as a trailing stop Davidnmfarrell NinjaTrader Programming 5 April 26th, 2010 01:54 PM
catching dataseries from DoubleMA max-td NinjaTrader Programming 1 June 12th, 2009 07:56 AM


All times are GMT -4. The time now is 10:16 PM.

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-10 in 0.08 seconds with 20 queries on phoenix via your IP 54.221.73.186