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
Can I get the Symbol in OL?
Last Activity 4/19/2019 8:33 PM
4 replies, 74 viewings

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

^ Top
kmcintyre

Regular
252525
Posts: 78

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

User Profile
 
Subject : Can I get the Symbol in OL?
Posted : 4/9/2019 4:36 PM
Post #30361

I would like to create OL that determines which Symbol the Bar data is for, and then performs logic specific to that symbol.

Is that possible?

Thanks

Keith

^ Top
Mel

Veteran
100252525
Posts: 185

Joined: 3/18/2006

User Profile
 
Subject : RE: Can I get the Symbol in OL?
Posted : 4/9/2019 5:12 PM
Post #30362 - In reply to #30361

In OL, you can get the symbol string by symboldata.symbol, a string. Then, you make a big, ugly if statement

if symboldata.symbol = "MSFT" then
...
elseif symboldata.data = "APPL" then
...

and so on.



^ Top
Jim Dean

Sage
20001000100252525
Posts: 3189

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

User Profile
 
Subject : RE: Can I get the Symbol in OL?
Posted : 4/9/2019 5:37 PM
Post #30363 - In reply to #30362

Or, you can shorten the reference to be simply “Symbol”
^ Top
kmcintyre

Regular
252525
Posts: 78

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

User Profile
 
Subject : RE: Can I get the Symbol in OL?
Posted : 4/9/2019 6:10 PM
Post #30364 - In reply to #30361

Thanks Jim!

I thought there was but I checked the IDE | All functions listbox and didn't find it...

Keith

^ Top
Jim Dean

Sage
20001000100252525
Posts: 3189

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

User Profile
 
Subject : RE: Can I get the Symbol in OL?
Posted : 4/9/2019 9:00 PM
Post #30365 - In reply to #30364

Sure.

Another member of the symboldata class, “Numrec”, also can be used simply. Numrec = number of bars loaded
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.