|
kmcintyre
 Veteran
  Posts: 132
Joined: 9/12/2007
Location: Valley Center, CA
User Profile |
dim iCycles as integer
dim iIdx as integer
' do logic to find a cycle low
' iIdx = the number of bars back where the cycle low occurred
iCycle[iIdx] = -1 ' mark as cycle low
BUT no can do because OL doesn't support assignments to array elements!
Really?
Is there any way around this? It's kinda a show stopper...
|
|
Jim Dean
 Sage
       Posts: 3433
Joined: 3/13/2006
Location: L'ville, GA
User Profile |
You can work forward and save a minimum value and the bar it occurred on. Or you can loop backward and find it. No support for arrays, no.
|
|
Jim Dean
 Sage
       Posts: 3433
Joined: 3/13/2006
Location: L'ville, GA
User Profile |
But you cannot assign a value to a prior bar’s instance of a variable. That is by design, to prevent crystal-ball coding.
|
|
kmcintyre
 Veteran
  Posts: 132
Joined: 9/12/2007
Location: Valley Center, CA
User Profile |
statistically significant crystal balls are exactly what indicators and systems are attempting to be.
Stop trying to protect me from myself. I don't want to live in a nanny state.
Any time I use square brackets to access specific data elements in a collection, I am essentially using an array. Close[6] is an array access into the array of closing prices.
I guess I'll have to go back to MT4 or Ninja. What a shame...
|
|
Jim Dean
 Sage
       Posts: 3433
Joined: 3/13/2006
Location: L'ville, GA
User Profile |
Hey buddy
I’m not your nanny nor did I create the rules. Just trying to help.
If you use the SDK you can do whatever you want. VB.NET
|
|
kmcintyre
 Veteran
  Posts: 132
Joined: 9/12/2007
Location: Valley Center, CA
User Profile |
The nanny comment was not pointed at you.
Thanks for your help.
I'll look at the SDK.
|