Null Plots - NinjaTrader Programming | futures io social day trading
futures io futures trading


Null Plots
Updated: Views / Replies:2,150 / 7
Created: by kenz987 Attachments:0

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

Null Plots

  #1 (permalink)
Just starting out...
Houston, TX
 
Futures Experience: Intermediate
Platform: Ninja, MetaTrader
Broker/Data: IB
Favorite Futures: EUR/USD 6E
 
Posts: 23 since Apr 2010
Thanks: 16 given, 5 received

Null Plots

In some indicators there are null plots.
if(x)
Plot0.Set
else
Plot1.Set
...
If you call that indicator from a strategy, how do you tell if a plot is null, since it is assigned to a double?
Thanks, Ken.

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

 
  #3 (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,352 given, 83,232 received


It will vary depending on the code. It would be best to post a fully functional example.

Is this a commercial closed-source system? If so, you might have to just some more complex stuff for determining which plots to pay attention to. Sometimes unwanted plots will return 0 or will return the Close price.

I had worked with a closed-source system before that returned Close price for example on any plots it wasn't using at the time.

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:
 
  #4 (permalink)
Just starting out...
Houston, TX
 
Futures Experience: Intermediate
Platform: Ninja, MetaTrader
Broker/Data: IB
Favorite Futures: EUR/USD 6E
 
Posts: 23 since Apr 2010
Thanks: 16 given, 5 received

Thanks Mike,
It is more a theoretical question, since I have the source code and can program around it, but seems there should be a way to check for nulls, since in database programming (and in excel) it is necessary. Ken.
ps: It does return some value, perhaps the close, I didn't check it.


Last edited by kenz987; May 6th, 2010 at 06:40 PM. Reason: ps
Reply With Quote
 
  #5 (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,352 given, 83,232 received


kenz987 View Post
Thanks Mike,
It is more a theoretical question, since I have the source code and can program around it, but seems there should be a way to check for nulls, since in database programming (and in excel) it is necessary. Ken.
ps: It does return some value, perhaps the close, I didn't check it.

If you have the original indicator code, just use a Signal dataseries.

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
 
  #6 (permalink)
Just starting out...
Houston, TX
 
Futures Experience: Intermediate
Platform: Ninja, MetaTrader
Broker/Data: IB
Favorite Futures: EUR/USD 6E
 
Posts: 23 since Apr 2010
Thanks: 16 given, 5 received

ContainsValue

Well, I was just browsing around help and ran into this on the DataSeries Class help page:
//Checking for Valid Values
//It is possible that you may use a DataSeries object but decide not to set a value for a specific bar.
//Internally, a dummy value does exist which is the current bar close however,
//if you wanted to check to see if it was a valid value that you set, you can check the following method.
// test this for null values
// DataSeries.ContainsValue(int barsAgo)
//Returns a true or false value.
Also found something else interesting:
The Plot0.ContainsValue( index is intBarsAgo), so is the .Set
but the .Get is (index) or CurrentBar (may be CurrentBar plus or minus 1 - I'm not sure on this) but the inconsistency just floored me! Took me a while of frustration to realize what happened.
Hope this info is of some help to other coders. Ken.




Reply With Quote
The following 2 users say Thank You to kenz987 for this post:
 
  #7 (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

Thanks Ken,

I'm trying to advance my coding education and it's little things like this that could help turn the corner for the next big thing.

If you or anyone would care to use these few lines in an actual code to show their usage and results, it would be greatly appreciated!

Kirk

Reply With Quote
 
  #8 (permalink)
Just starting out...
Houston, TX
 
Futures Experience: Intermediate
Platform: Ninja, MetaTrader
Broker/Data: IB
Favorite Futures: EUR/USD 6E
 
Posts: 23 since Apr 2010
Thanks: 16 given, 5 received

Hi Kirk,
I don't have specific code handy, but here is something similar to what I was doing:
Say you have an indicator and the trend is shown by a Plot0 blue for an uptrend, and a Plot1 red for a downtrend, and you watch those values for a trend change. Similar to an EMA, but these come in two different plots.
if(Plot0.ContainsValue(0)) // true then not null
{
double dX = Plot0.Get(CurrentBar) // gotcha
}
// etc, (for compute on close)
I know you might not use Get that way unless you want the value of an offset way back (in my test case I only had values at the turns, not every bar).
Still learning this myself.
Ken.
ps: I forgot to say, I was calling the indicator from a strategy.


Last edited by kenz987; May 10th, 2010 at 11:30 PM. Reason: ps:
Reply With Quote
The following user says Thank You to kenz987 for this post:

Reply



futures io > > > > > Null Plots

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
Looking for indicator that plots Volume POC forrestang NinjaTrader 20 October 15th, 2015 02:45 AM
Trouble with multiple plots on an indicator eddd NinjaTrader Programming 3 May 31st, 2011 04:45 PM
Indi works on chart, not in Market Analyzer. Null ref check? MXASJ NinjaTrader Programming 5 May 12th, 2011 10:34 PM
Can GOMRecorder used to persist indicator plots? molecool NinjaTrader Programming 1 April 7th, 2011 04:33 PM
Ninjatrader indicators without plots jstnbrg NinjaTrader 6 March 2nd, 2011 02:14 AM


All times are GMT -4. The time now is 03:19 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-14 in 0.11 seconds with 19 queries on phoenix via your IP 54.145.16.43