NexusFi: Find Your Edge


Home Menu

 





N/A Values


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one bobwest with 1 posts (1 thanks)
    2. looks_two mastermind007 with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 CannonTrading with 1 posts (0 thanks)
    1. trending_up 1,397 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

N/A Values

  #1 (permalink)
mastermind007
Mozambique
 
Posts: 3 since Jan 2014
Thanks Given: 5
Thanks Received: 3

I have experienced something weird and don't know how to get around it.

Within Ninja, I am experimenting with a trial version of a third party indicator that plots dots above or below candle at certain important turning points. (trade signals)

The indicator is provided as secured DLL so I cannot really access the internals but intellisense reveal that the name of Data Series responsible for dots is named High.

Using a Cross-cursor when I hover at the candle with dots on it, values of High shown in data box is a valid number (usually Close of candle) and everywhere where no dot is plotted it is shown as N/A.

So, I confidently wrote (expecting it to work first time)

 
Code
if ( Double.IsNan(ind.High[1]) && !Double.IsNan(ind.High[0]))
unfortunately this did not work. So, I tried

 
Code
if (!Double.IsNan(ind.High[0]))
This did not work either. Tried few more ideas. CrossAbove, CrossBelow etc etc and nothing worked

After few trials and errors, I tried

 
Code
if (ind.High[0] > 0)
last returns true for each and every candle.

IsNan is officially documented function in C# to detect numeric fields that do not have data

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #3 (permalink)
 
CannonTrading's Avatar
 CannonTrading   is a Vendor
 
Posts: 216 since Mar 2013
Thanks Given: 77
Thanks Received: 183


I have written a few codes for both CQG and sierra charts but not for ninja. My best advice is to contact the vendor of the signals and ask them directly.

Follow me on Twitter Reply With Quote
  #4 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,341
Thanks Received: 26,267


mastermind007 View Post
I have experienced something weird and don't know how to get around it.

Within Ninja, I am experimenting with a trial version of a third party indicator that plots dots above or below candle at certain important turning points. (trade signals)

The indicator is provided as secured DLL so I cannot really access the internals but intellisense reveal that the name of Data Series responsible for dots is named High.
....

IsNan is officially documented function in C# to detect numeric fields that do not have data

The field probably is not actually empty; NT puts dummy values in whenever no actual value is used, and you have to check for that. Try the ContainsValue property of the dataseries. I think this may be your answer.

From the entry on DataSeries Class in the Ninja help file:


Quoting 
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. However, you should not try to access a DataSeries value that has not been set. Internally, a dummy value does exists, but you want to check to see if it was a valid value that you set before trying to access it for use in your calculations.



DataSeries.ContainsValue(int barsAgo)
Returns a true or false value.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
Thanked by:




Last Updated on January 11, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts