NexusFi: Find Your Edge


Home Menu

 





What's the best way to store these values?


Discussion in NinjaTrader

Updated
    1. trending_up 970 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 1 attachments




 
Search this Thread

What's the best way to store these values?

  #1 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

Hi,

I'm trying to store values when the condition below is valid:-

[CODE]
if(CurrentBar < 5) return;

if (Math.Max(Close[2],High[1])>Math.Max(Close[1],High[0]) && Math.Max(Close[2],High[1])>Math.Max(Close[3],High[2]))
[CODE]

I've tried using a dataseries and upon "printing" (read: verifying) the values, it appears fine at the beginning of the chart (that is ignoring the zeroes that are generated when there is no valid point) but goes awry by the time we get to the more current bars (no more zeroes but actually successive points of reference which is not possible). Values appear to be plucked from the air appear in the dataseries.

What I'm trying to achieve:-
1) Get the data so that I can draw rays (see attached chart)
2) To draw a ray however, I need to be able to identify 2 points for the "bars ago" parameter and the values associated with those points.
3) The more current points can have multiple lines drawn through them from the older points provided the older points have a higher value that the current point.

Any suggestions?

Regards

Kay Wai

Attached Thumbnails
Click image for larger version

Name:	$USDSGD (Daily)  8_19_2015 - 12_26_2015.jpg
Views:	146
Size:	113.9 KB
ID:	200715  
Reply With Quote




Last Updated on January 8, 2016


© 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