Want to create an indicator and have no idea where to start? - NinjaTrader Programming | futures io social day trading
futures io futures trading


Want to create an indicator and have no idea where to start?
Updated: Views / Replies:11,017 / 93
Created: by forrestang Attachments:30

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

Want to create an indicator and have no idea where to start?

  #31 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post
I'm going back to "Plan A" of trying to reference these indicators from my own script.

Ok, so the goal is to figure out how to get all the Vertical Positions AND colors of the oscilators I am using, and draw items based on those things.

So I figured out the vertical position. The colors cannot be referenced by ninja directly. I was messing around with some print commands in various parts of the ORIGINAL indicators..... I stuck a print command in where I think the various colors might be occuring, and I printed arrows on the chart.

Here you can see the red arrows track the color change of the green/black line in the 2nd pane. The red tracks it perfectly, the green was supposed to be there when the line is green, but it is a bit off.

I don't know how to do it yet, but I wonder if I can take and create a function that I can call WITHIN the original code to make these things easily available to be used outside in MY script I am creating?

Getting closer.

Attached Thumbnails
Want to create an indicator and have no idea where to start?-prime2011-05-29_003903.jpg  
Reply With Quote
 
  #32 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post

..........Here you can see the red arrows track the color change of the green/black line in the 2nd pane. The red tracks it perfectly, the green was supposed to be there when the line is green, but it is a bit off.

Got it!

Got the ERG(that black/green osc) to reflect when the color changes for UP and DOWN now. So I've got an idea how to track it. I still need to find one more item, and that is the tracking of the color of those price bars you see. That's either up or down.

Then it will just be organizing the data in an easy to read format, and finding a way to make it available OUTSIDE of these original indicators.

Attached Thumbnails
Want to create an indicator and have no idea where to start?-prime2011-05-29_013347.jpg  
Reply With Quote
 
  #33 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received


Hi Forrestang,

If your ProfTest Code still had this:

 
Code
Overlay = true; 
 
or

if (ProfTradeErg > 10){
DrawArrowUp("arrow"+CurrentBar.ToString(), true, Time[0], Low[0]-2, Color.Green);
} 
 
you ought to add this [CODE*TickSize][/CODE] so it will look like this:
 
Code
if (ProfTradeErg > 10){
DrawArrowUp("arrow"+CurrentBar.ToString(), true, Time[0], Low[0]-2*TickSize, Color.Green);
} 
 

Not sure if you prefer the arrows on the price panel or not, since the horizontal lines from the Initialize section shouldn't be there if you do.

Also, you might want to create your
 
Code

double ProfStrengthHist = ERG_Str1().HIST[0]; //Access to Strength Histo Position
double ProfTradeErg = ERG_Trade().ERG[0]; //Access to Trading Erg Position
double ProfTradeHist = ERG_Trade().HIST[0]; 
as dataseries so that you can reference the prior bar's state. There are ways to use loops to emulate a dataseries (which is over my head). Otherwise, need to find otherways to draw arrows for only when the condition changes (if that's what you prefer to see rather than several continuous bars with the arrow below.

Keep up the good work.

Kirk

Reply With Quote
The following user says Thank You to zeller4 for this post:
 
  #34 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Thanks Zeller, I had just put the arrows in there so that I could verify that I could get the script to output something when the indicator was doing something. So it was just a flag sort of while I was trying to understand it.

About the data series, that is what I am working on now, so that I can get all the values into my study.

Reply With Quote
 
  #35 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post
....... I still need to find one more item, and that is the tracking of the color of those price bars you see. That's either up or down.

Then it will just be organizing the data in an easy to read format, and finding a way to make it available OUTSIDE of these original indicators.

Believe I found the portion of the script for the color bars. You can see on the chart, I through some arrows on there to visually see it.

Ok, now onto making this into a data series somehow available OUTSIDE the original indicators.

Attached Thumbnails
Want to create an indicator and have no idea where to start?-prime2011-05-29_231714.jpg  
Reply With Quote
 
  #36 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post

Ok, now onto making this into a data series somehow available OUTSIDE the original indicators.

Can anyone tell me how to create a data series, that will be available to be referenced by any study?

I want to create a data series INSIDE the original indicator, so that I can easily grab it from another study. How should it be declared?

Reply With Quote
 
  #37 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post
Can anyone tell me how to create a data series, that will be available to be referenced by any study?

I want to create a data series INSIDE the original indicator, so that I can easily grab it from another study. How should it be declared?

Indicator: Exposing indicator values that are not plots - NinjaTrader Support Forum

Maybe this will shed some light on it?

Reply With Quote
 
  #38 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received



I must still be doing something wrong. I installed that sample study, and tried to get access to the data series in that study from another random study, and I get an error that says:

"NinjaTrader.Indicator.SampleBoolSeries.bullIndication is inaccessible due to its protection level"

I tried to reference it this way:

 
Code
 Print(SampleBoolSeries().bullIndication[0]);

Reply With Quote
 
  #39 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


forrestang View Post
I must still be doing something wrong. I installed that sample study, and tried to get access to the data series in that study from another random study, and I get an error that says:

"NinjaTrader.Indicator.SampleBoolSeries.bullIndication is inaccessible due to its protection level"

I tried to reference it this way:

 
Code
 Print(SampleBoolSeries().bullIndication[0]);

Ahah!

To get at that data as a public property, it has to be capitalized.

Reply With Quote
 
  #40 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


Ok, I have access to 6 of the 7 variables I need to base my logic on.

I didn't realize it, but the first 6 are "exposed variables" put into data series that are easily available. The 7th variable is the color of the bars, I may have to actually create inside the original indicator?

Here are some pictures, and the arrows are just there to show that I am tracking the state change of each indicator whether it is a color or the level.

Attached Thumbnails
Want to create an indicator and have no idea where to start?-strength_histo_vertical.jpg   Want to create an indicator and have no idea where to start?-strength_histo_color.jpg   Want to create an indicator and have no idea where to start?-trade_histo_vertical.jpg   Want to create an indicator and have no idea where to start?-trade_histo_color.jpg   Want to create an indicator and have no idea where to start?-trade_erg_vertical.jpg   Want to create an indicator and have no idea where to start?-trade_erg_color.jpg  
Reply With Quote
The following user says Thank You to forrestang for this post:

Reply



futures io > > > > > Want to create an indicator and have no idea where to start?

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
Is there a Programmer that can create this Congestion Indicator nillz123 NinjaTrader 9 December 28th, 2013 01:19 PM
Simple Divergence and Stop Box Indicator Idea! tdaman Platforms and Indicators 5 May 16th, 2011 09:44 AM
want to create a new indicator. joyginy NinjaTrader Programming 5 January 18th, 2010 06:52 PM
Create this indicator Zoethecus NinjaTrader Programming 16 November 16th, 2009 07:56 PM
trying to create a Trend Line Rejection Indicator Eric NinjaTrader Programming 5 October 27th, 2009 03:45 PM


All times are GMT -4. The time now is 11:54 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-15 in 0.16 seconds with 20 queries on phoenix via your IP 54.163.210.170