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,005 / 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?

  #41 (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
The 7th variable is the color of the bars, I may have to actually create inside the original indicator?

Got it!

This one wasn't the same. So I created a int DataSeries in the original indicator.

Then I could access it. But initially, this only changes the Data series when the color changed. So it wasn't a populated data series for every bar... if that makes sense?

So my DataSeries was all zeros, and +1 when up, and -1 when down. The zeroes weren't any good in there, so I added an IF statement:

 
Code
if (ERG_Trade().Ltsx[0] == 0) 
{
ERG_Trade().Ltsx[0] = ERG_Trade().Ltsx[1];
}
"Ltsx" is my data series created in the original. So now, after getting the data series, I check for 0, and if it is equal to 0, then fill it in with the previous bar's color bar value.

And here is a pic, it is tracking the change of the color bars. So I've got all 7 variables I need, now on to phase II for real this time!

Attached Thumbnails
Want to create an indicator and have no idea where to start?-lts_color.jpg  
Reply With Quote
 
  #42 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received

 
Thread Moved


Thread moved to NinjaTrader Programming



When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading



Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #43 (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
............now on to phase II for real this time!

Woot!!!

I'm adding these trade definitions in a really clumsy way at the moment, but they are there, which is exciting. Take a look at the pic, you see 3 green arrows where possible trades are. I have a ton more scenarios to add in manually, but it's on the right track for now.

Oh, Woot!!

Attached Thumbnails
Want to create an indicator and have no idea where to start?-desktop.jpg  
Reply With Quote
 
  #44 (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


zeller4 View Post
Hi Forrestang,

If your ProfTest Code still had this:

.........you ought to add this [CODE*TickSize][/CODE] so it will look like this:


..........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

Made your adjustment on the arrows, thanks!

I've got a clumsy way to draw the arrows only on the bar when it switches.

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

Having a problem.

Here is a pic of my indicator, and the code associated with my clumsy way of painting arrows. I have a lot of specific scenarios I want to set up, so I want to paint the scenario(1a_a, 1a_b, 1a_c... etc) along with the chart marker.

Here, all 3 of these green arrows on my chart should have the label "1a_a" under their prices like the one arrow does. I dont know how to use the "Draw" feature obviously.

How should this be set so the text will be drawn just like each arrow?

Here is the code snippet if it's hard to see:
 
Code
if(ERG_Trade().Ltsx[0] == 1 && ERG_Str1().HISTSlope[0] == 1 && ERG_Trade().HIST[0] >= 10 )
	{
	   if(ERG_Trade().HISTSlope[1] == 1 && ERG_Trade().HISTSlope[2] == 1 && ERG_Trade().HISTSlope[3] == -1)
		{	
		DrawArrowUp("arrow"+CurrentBar.ToString(), true, Time[0], Low[0]-12*TickSize, Color.Green);
		DrawText("text"+CurrentBar.ToString(), Open.ToString(), 0, Low[0]-30*TickSize, Color.Black);
		DrawText("text","1a_a", 0, Low[0]-38*TickSize, Color.Black);
		}
	}
Initially i thought it was because those DrawText objects with the same tag. But I checked by removing one of them, and still the same problem. So still not sure why it won't draw on ALL the arrows?

Attached Thumbnails
Want to create an indicator and have no idea where to start?-prime2011-05-30_184623.jpg  
Reply With Quote
 
  #46 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary

you are giving them identical tag 'text' in this case, try text1, text2, text3 instead.

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


cory View Post
you are giving them identical tag 'text' in this case, try text1, text2, text3 instead.

I tried that, still seems to not print.

Reply With Quote
 
  #48 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received


forrestang View Post
Having a problem.

Here is a pic of my indicator, and the code associated with my clumsy way of painting arrows. I have a lot of specific scenarios I want to set up, so I want to paint the scenario(1a_a, 1a_b, 1a_c... etc) along with the chart marker.

Here, all 3 of these green arrows on my chart should have the label "1a_a" under their prices like the one arrow does. I dont know how to use the "Draw" feature obviously.

How should this be set so the text will be drawn just like each arrow?

Here is the code snippet if it's hard to see:
 
Code
if(ERG_Trade().Ltsx[0] == 1 && ERG_Str1().HISTSlope[0] == 1 && ERG_Trade().HIST[0] >= 10 )
	{
	   if(ERG_Trade().HISTSlope[1] == 1 && ERG_Trade().HISTSlope[2] == 1 && ERG_Trade().HISTSlope[3] == -1)
		{	
		DrawArrowUp("arrow"+CurrentBar.ToString(), true, Time[0], Low[0]-12*TickSize, Color.Green);
		DrawText("text"+CurrentBar.ToString(), Open.ToString(), 0, Low[0]-30*TickSize, Color.Black);
		DrawText("text","1a_a", 0, Low[0]-38*TickSize, Color.Black);
		}
	}
Initially i thought it was because those DrawText objects with the same tag. But I checked by removing one of them, and still the same problem. So still not sure why it won't draw on ALL the arrows?

Try this


 
Code
 
                DrawArrowUp("arrow"+CurrentBar, true, 0, Low[0]-12*TickSize, Color.Green);
		DrawText("text0"+CurrentBar, ""+Open.ToString(), 0, Low[0]-30*TickSize, Color.Black);
		DrawText("text1"+CurrentBar ,"1a_a", 0, Low[0]-38*TickSize, Color.Black);

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following 2 users say Thank You to ThatManFromTexas for this post:
 
  #49 (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


ThatManFromTexas View Post
Try this......

Yep! Thanks, that did it!

Attached Thumbnails
Want to create an indicator and have no idea where to start?-prime2011-05-31_010504.jpg  
Reply With Quote
 
  #50 (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


Got the logic done and it's doing what I want.

Is there a simple way to add a closing arrow to this? Does NT have some function built in so that once my green/red arrow prints to show my entry, I can plot an exit AFTER that entry arrow?

Asking as eventually I'll want to kick this out to a strategy.

Attached Thumbnails
Want to create an indicator and have no idea where to start?-prime2011-06-01_020747.jpg  

Last edited by forrestang; June 1st, 2011 at 10:29 AM.
Reply With Quote

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 04:37 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.12 seconds with 20 queries on phoenix via your IP 54.234.255.29