OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniLanguage Discussion
so there is no way to assign values to arrays?
Last Activity 7/6/2025 3:47 AM
5 replies, 1944 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
kmcintyre

Veteran
10025
Posts: 132

Joined: 9/12/2007
Location: Valley Center, CA

User Profile
 
Subject : so there is no way to assign values to arrays?
Posted : 6/24/2018 2:00 PM
Post #30092

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...





^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: so there is no way to assign values to arrays?
Posted : 6/24/2018 2:08 PM
Post #30093 - In reply to #30092

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.
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: so there is no way to assign values to arrays?
Posted : 6/24/2018 2:32 PM
Post #30094 - In reply to #30093

But you cannot assign a value to a prior bar’s instance of a variable. That is by design, to prevent crystal-ball coding.
^ Top
kmcintyre

Veteran
10025
Posts: 132

Joined: 9/12/2007
Location: Valley Center, CA

User Profile
 
Subject : RE: so there is no way to assign values to arrays?
Posted : 6/24/2018 5:58 PM
Post #30095 - In reply to #30092

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...


^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: so there is no way to assign values to arrays?
Posted : 6/24/2018 9:12 PM
Post #30096 - In reply to #30095

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
^ Top
kmcintyre

Veteran
10025
Posts: 132

Joined: 9/12/2007
Location: Valley Center, CA

User Profile
 
Subject : RE: so there is no way to assign values to arrays?
Posted : 6/25/2018 12:56 PM
Post #30097 - In reply to #30092

The nanny comment was not pointed at you.

Thanks for your help.

I'll look at the SDK.


Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.