Null Plots - futures io
futures io futures trading



Null Plots


Discussion in NinjaTrader

Updated by kenz987
      Top Posters
    1. looks_one kenz987 with 4 posts (3 thanks)
    2. looks_two Big Mike with 2 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 zeller4 with 1 posts (0 thanks)
    1. trending_up 2,548 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 7 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Thread Tools Search this Thread
 

Null Plots

  #1 (permalink)
Houston, TX
 
 
Posts: 23 since Apr 2010
Thanks: 17 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

Can you help answer these questions
from other members on futures io?
Convert NinjaTrader NT7 indicator to Tradestation EasyLanguage and RADARSCREEN
Platforms and Indicators
Issue meeting order entry conditions
Elite Automated NinjaTrader Trading
Last 5 minutes Label
ThinkOrSwim
Moving average with Lag reduction
NinjaTrader
Linux?
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
200 thanks
What is your single biggest weakness?
59 thanks
Want your NinjaTrader indicator created, free?
47 thanks
Is Amp at risk of going under?
40 thanks
VWAP for stock index futures trading?
39 thanks
 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 48,729 since Jun 2009
Thanks: 31,458 given, 93,992 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

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #4 (permalink)
Houston, TX
 
 
Posts: 23 since Apr 2010
Thanks: 17 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 05:40 PM. Reason: ps
Reply With Quote
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 48,729 since Jun 2009
Thanks: 31,458 given, 93,992 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

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal Reply With Quote
 
  #6 (permalink)
Houston, TX
 
 
Posts: 23 since Apr 2010
Thanks: 17 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)
Florida
 
Experience: Intermediate
Platform: NT7
Trading: CL, NQ, NG
 
Posts: 469 since Jun 2009
Thanks: 1,401 given, 402 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)
Houston, TX
 
 
Posts: 23 since Apr 2010
Thanks: 17 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 10:30 PM. Reason: ps:
Reply With Quote
The following user says Thank You to kenz987 for this post:



futures io Trading Community Platforms and Indicators NinjaTrader > Null Plots




Upcoming Webinars and Events
 

Understanding Order Flow Stop Runs & Icebergs w/Bookmap

May 28
 

Free BloodHound Licenses to everyone!

June
     



Copyright © 2020 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