![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: May 2007
Posts: 112
Thanks: 0
Thanked 0 times in 0 posts
|
I am having trouble figuring the best way to find the priorclose 2, 3+ days ago...
The closest I can get (no cigar, not accurate) is this: Code:
int barsperday = 1440 / Bars.Period.Value; closeratio = PriorDayOHLC().PriorClose[(i-1)*barsperday]/PriorDayOHLC().PriorClose[i*barsperday]; Same goes for not running an indicator unless X days of data are present ? Instead of Code:
if (CurrentBar < barsperday * period)
return;
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Current Bid > High of Previous 20 Days | davidfw1866 | Strategy Development | 2 | 11-27-2007 06:08 AM |
| Ninja log from previous day | geoarb | Miscellaneous Support | 1 | 08-16-2007 01:40 AM |
| Referencing Previous Instance(s) Of Condition | roxana | Automated Trading | 11 | 08-01-2007 05:13 PM |
| CrossBelow previous bar and omit current bar | ct | General Programming | 1 | 06-03-2007 02:54 AM |
| Reloading a previous sim chart | Antraman | Miscellaneous Support | 7 | 12-27-2005 03:51 AM |