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.


Only Forum Moderators, Administrators, and the owner of this message may delete it.

 
Jim Dean

Sage
2000100010010010010025
Posts: 3433

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

User Profile
 
Subject : RE: My own Olang Indicator
Posted : 7/19/2015 3:51 AM
Post #23501 - In reply to #23500

Tom is correct that is the "normal" way for a scan to be structured.

However, if the Return value from the called function is itself a true/false flag, no other Boolean operators or syntax are needed.

That is, if myindicator() returns 0, it is interpreted as "false" … if it returns -1 (or any other nonzero value), it is interpreted as "true".

Or you can combine it (as a T/F value) with other logical conditions, such as:
myindicator() And Sma(V,50) > 1e5

Click here for a pretty extensive explanation about how and why the zero and nonzero answers are treated as false and true, plus a bunch of other interesting (to some people :-) factoids regarding Boolean math in OLang and OScript.

[Edited by Jim Dean on 7/19/2015 4:05 AM]

Deleting message 23501 : RE: My own Olang Indicator


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