![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Feb 2008
Posts: 16
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I am trying to code an indicator based on CCI. I use the command as follow: a) CCI(50)[0] - Because I want to use CCI 50 and current bar to made a calculation. I wonder if this is correct. b) CCI(50)[1] - Because I need the bar before to made other calculation. But somehow I got an out put of "0" when I start to plot the chart. Question = = Can I use the [1] to represent the parameters of CCI of the pervious bar??? I hope somehow could give a some clue. Thanks shek |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Yes,
CCI(50)[1] is the value 1 bar ago. You are likely runing into this problem - http://www.ninjatrader-support.com/v...ead.php?t=3170
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Feb 2008
Posts: 16
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Ray,
I think you are right! Many Many thanks for the help! I used [5] and that is why I cannot get anything! Hahaha, i have learn something new. Now my output in the chart made sense!!! Thanks again. Shek Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Range Bars Count down Formula for Woodiee CCI | Pipqueen | Suggestions And Feedback | 1 | 11-29-2007 09:41 AM |
| Using a formula or variable as an input to an Indicator | nolantx | Indicator Development | 5 | 05-24-2007 03:58 PM |