![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Dear traders,
I need some help with close[0] and close[1]. When I DO set.plot(close[0] > open[0]?1:0) I have my new plot, all is ok ! But when I do set.plot(close[0] > close[1]?1:0) I have nothing - a blank chart ! What can I do to create an indicator witch says "1" if close > close[1]. Thanks and regards, David |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
You will find the problem in your logs.
To fix you'll need to add code like this: Code:
if (CurrentBar < 1) return;
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Dear Dirk,
It's Ok now, thanks. But what does it mean ? Regards David |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Please see here: http://www.ninjatrader-support.com/H...urFormula.html
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Ok, thanks a lot !
David |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bar Close / Open timing | Kardinal | Charting | 2 | 07-06-2007 08:06 AM |
| buy/sell at close of bar? | coffee898 | Charting | 4 | 03-20-2007 03:55 AM |
| Open position on close down | andrewedmondson | ATM Strategies (Discretionary Trading) | 3 | 10-05-2005 07:02 AM |
| Canel or Close | scjohn | Automated Trading | 3 | 06-21-2005 12:06 AM |
| Limit on close | gdargento | Suggestions And Feedback | 1 | 04-08-2005 06:33 AM |