Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming


Notices
     

Can I add existing indicators to an indicator I am creating?
Started:July 16th, 2011 (04:31 AM) by forrestang Views / Replies:1,567 / 27
Last Reply:July 19th, 2011 (03:31 AM) Attachments:13

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

This forum was established to help traders by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

BMT is 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
     

Reply
 13  
 
Thread Tools Search this Thread

Can I add existing indicators to an indicator I am creating?

Old July 16th, 2011, 04:31 AM   #1 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received

Can I add existing indicators to an indicator I am creating?

Howdy,

I am wanting to create a new indicator that will be referencing some other studies.

Is there a writeup somewhere that explains how I could in a sense ADD these indicators to MY indicator, so that when one puts my indicators on a chart, they could configure all of the settings of the studies my study will be referencing?

Reply With Quote
     

Old July 16th, 2011, 04:31 AM   #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 July 16th, 2011, 07:03 AM   #3 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,382 since Mar 2010
Thanks: 3,941 given, 19,596 received
Forum Reputation: Legendary



forrestang View Post
Howdy,

I am wanting to create a new indicator that will be referencing some other studies.

Is there a writeup somewhere that explains how I could in a sense ADD these indicators to MY indicator, so that when one puts my indicators on a chart, they could configure all of the settings of the studies my study will be referencing?

You do not need to add that second indicator. You will simply call it. For clarity, let me describe an example and assume that you want to call the signalline of the MACD and use it as a trendfilter.

You will then call the MACD in OnBarUpdate() to catch the values, for example
 
Code
double signalLine = MACD(Input, fast, slow, smooth).Avg[0];
If you call the MACD, it requires 4 input Parameters:

-> the DataSeries you want to apply it to - this can be "Input", but also another indicator
-> the period of the fast moving average
-> the period of the slow moving average
-> the period of the signalline

The input parameters can only be used, if you have declared the variables, so you need to add them to the Variables section
 
Code
private int fast = 12;
private int slow = 26;
private int smooth = 9;
If you want to make these parameters user accessible in your indicator, you also need to define properties for each of them in the properties section. This will make appear "fast", "slow" and "smooth" in the indicator box of your indicator, so that it can be configured, when your indicator has been put onto a chart.

Reply With Quote
     
The following 3 users say Thank You to Fat Tails for this post:
     

Old July 16th, 2011, 05:54 PM   #4 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received

How would I go about populating an oscilator panel with a color?

Say for example I am able to draw arrows on the price chart with various conditions. How do I instead of doing that.... just draw a switchin color in the oscilator pane.

It would look like the picture below. This is from the PriceActionSwingTrend indicator. I would like to populate mine(3rd pane) like this.

Attached Thumbnails
Can I add existing indicators to an indicator I am creating?-howto.jpg  
Reply With Quote
     

Old July 16th, 2011, 06:05 PM   #5 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received

Current BMT User Poll

Should sim traders that pretend to trade cash be allowed on BMT?

 

forrestang View Post
How would I go about populating an oscilator panel with a color?

Say for example I am able to draw arrows on the price chart with various conditions. How do I instead of doing that.... just draw a switchin color in the oscilator pane.

It would look like the picture below. This is from the PriceActionSwingTrend indicator. I would like to populate mine(3rd pane) like this.

Ah, Got it.

Reply With Quote
     

Old July 16th, 2011, 06:08 PM   #6 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received


forrestang View Post
Ah, Got it.

Jeez I'm such a newb.

Got the first part working. Got to add in some other stuff. Arrows are just there for debugging.

Attached Thumbnails
Can I add existing indicators to an indicator I am creating?-suchanewb.jpg  
Reply With Quote
     

Old July 16th, 2011, 06:15 PM   #7 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received

Moving right along............

Attached Thumbnails
Can I add existing indicators to an indicator I am creating?-suchanewb2.jpg  
Reply With Quote
     

Old July 16th, 2011, 06:54 PM   #8 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received

Please ignore the randomness of these posts...... it's just how I think, and I happen to be thinking out loud

Tracking color changes of IchiCloud, shown by red and green debug arrows.

Attached Thumbnails
Can I add existing indicators to an indicator I am creating?-suchanewb3.jpg  
Reply With Quote
     

Old July 16th, 2011, 07:14 PM   #9 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received

HH/HL above BLUE Cloud = Green

LL/LH below RED Cloud = red

Neither = yellow

Attached Thumbnails
Can I add existing indicators to an indicator I am creating?-suchanewb4.jpg  
Reply With Quote
     

Old July 16th, 2011, 09:08 PM   #10 (permalink)
Urban Samurai
Chicago IL
 
Trading Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Instrument: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,025 since Jun 2010
Thanks: 222 given, 632 received


WTF?

Wanted to change the display name of the indie to something different. Then Bam! All my colors changed, and now nothing shows up in my indie pane. WTF?

Reply With Quote
     

Reply



Tags
alert, alerts, bot, ces, change, chart, charts, cl, code, color, color changes, colors, condition, create, data, data series, dataseries, dom, dow, el, ema, errors, es, flag, future, indicator, indicators, initialize(), instrument, line, macd, market, market analyzer, master, moves, new indicator, ninja, ninjascript, ninjatrader, option, options, parameter, parameters, period, plan, plot, price, programming, pullbacks, purpose, puts, script, series, settings, start, studies, support, swing, template, time, trade, trading, user input, values, workspace, zigzag
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Can I add existing indicators to an indicator I am creating?

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help creating a NinjaTrader Indicator jjl1753 NinjaTrader Programming 4 June 13th, 2011 09:26 PM
Help with adding new code to existing oscillator indicator script kendallw4 NinjaTrader Programming 3 June 9th, 2011 06:38 PM
Interested in creating an indicator for me? estrader14 NinjaTrader Programming 2 February 20th, 2011 05:46 PM
Add arrow to any alerts in indicators emini_Holy_Grail NinjaTrader Programming 2 August 29th, 2010 12:02 PM


All times are GMT -4. The time now is 03:35 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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 2014-04-19 in 0.30 seconds with 20 queries on phoenix via your IP 107.20.131.154