Cumulative Index - NinjaTrader Programming | futures io social day trading
futures io futures trading


Cumulative Index
Updated: Views / Replies:2,471 / 12
Created: by kaywai Attachments:1

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

Cumulative Index

  #1 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Cumulative Index

Hi, I have this ratio ((Close[0]-Open[0])/(High[0]-Low[0])) and would like to create a cumulative index for it. could anyone please help?

Reply With Quote
 
  #2 (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,238 since Jun 2009
Thanks: 29,350 given, 83,214 received


kaywai View Post
Hi, I have this ratio ((Close[0]-Open[0])/(High[0]-Low[0])) and would like to create a cumulative index for it. could anyone please help?

If you mean you want to be able to reference the values in an indexed fashion bar, by bar, then you need a DataSeries.

 
Code
                            
//in #variables
private DataSeries myVal;

//in #init
myVal = new DataSeries(this);

//in #onbarupdate
myVal.Set((Close[0]-Open[0])/(High[0]-Low[0])); 
Then you can reference it, ie:

 
Code
                            
//The EMA 20 of myVal is:
double _ema20 EMA(myVal20)[0]; 
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
The following user says Thank You to Big Mike for this post:
 
  #3 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received


BigMike, I'm just trying to create a Line Chart. I plugged your code in and added in the initialize() section:

Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "PCum"));
Plots[
0].Pen.Width = 2;

No chart.

Reply With Quote
 
  #4 (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,238 since Jun 2009
Thanks: 29,350 given, 83,214 received


kaywai View Post
BigMike, I'm just trying to create a Line Chart. I plugged your code in and added in the initialize() section:

Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "PCum"));
Plots[
0].Pen.Width = 2;

No chart.

It's because you never defined a value for your plot DataSeries (PCum).

PCum.Set(value), same as the above example. Except for Plot's, you don't need to do the #variables and #init stuff, because the DataSeries is handled internally. You just need to .Set it.

If it is still unclear, post the entire indicator.

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
 
  #5 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

This is what I understood from what you wrote above. Got an error this time. so can't export.
#Variables = Blank
#Init = Added the 2 lines i mentioned above
#onbarupdate
PCum.Set((Close[0]-Open[0])/(High[0]-Low[0]));

Error message: PCum does not exist in the current context. CS0103

Reply With Quote
 
  #6 (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,238 since Jun 2009
Thanks: 29,350 given, 83,214 received

I'm on my notebook, no NT here or I could just do this for you in 30 seconds and post it . You can still attach the .cs file so I (or others) can look at it, or if still unanswered tomorrow I will try to remember to come back to the thread.

It's really quite simple. You've probably removed something you shouldn't have, have a type-o, or have manually changed the Plot name without updating the public DataSeries in the #params section.

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
The following user says Thank You to Big Mike for this post:
 
  #7 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Sorry dude, wasn't aware i could do that. Here it is.


Last edited by kaywai; January 24th, 2010 at 06:52 AM.
Reply With Quote
The following user says Thank You to kaywai for this post:
 
  #8 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

BigMike, I think one of the issues could be when the denominator (i.e High[0]-Low[0] =0). In such a situation, how would I resolve this issue as per your code?

Reply With Quote
 
  #9 (permalink)
Senior Member
sea side
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 217 since Dec 2009
Thanks: 86 given, 25 received

nice idea !
what is more interesting is that
if to plot 1 period MFI (money flow index) and Kaywai index together they looks quite similar.
But if to plot
OBV (on balance volume)
MFI in 3 period
and Kayawai index, "picture" becomes even more interesting

however, "as usual" it's "not working" on treasures

P.s. just don't know if that indicator already "completely created"

Krgds,
Andrew

Reply With Quote
 
  #10 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received


Andrew,

My chart doesn't plot at the moment. Can I assume you've got a workaround? If you could, could you please assist?

Reply With Quote

Reply



futures io > > > > > Cumulative Index

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
S&P500 index and S&P500 index futures correlation ocmsrzr Emini Index Futures Trading 15 October 9th, 2013 10:49 AM
Gomi cumulative delta gmorgan111 The Elite Circle 6 February 7th, 2012 02:15 AM
Multicharts Cumulative Delta Student of Tape MultiCharts 4 May 31st, 2011 06:24 AM
Gomi Cumulative Delta gmorgan111 Traders Hideout 2 May 11th, 2011 01:11 PM
Need some help creating a cumulative index kaywai NinjaTrader Programming 0 January 27th, 2010 11:28 AM


All times are GMT -4. The time now is 10:29 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.13 seconds with 19 queries on phoenix via your IP 54.221.73.186