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
Bar type specification for system or indicator cod
Last Activity 11/20/2019 5:19 PM
6 replies, 104 viewings

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

^ Top
JB

Legend
100100100100
Posts: 407

Joined: 6/6/2006

User Profile
 
Subject : Bar type specification for system or indicator cod
Posted : 11/20/2019 3:40 PM
Post #30642

Hi all
Does OL now allow one to specify what is happening in terms of types of bars into an indicator or system build directly or do we still have to set up a mimic of the requirement? For instance suppose I want to use the coincidence of an indicator change with the advent of a change in HA chart bars from red to Green in an OL coding, do I have to make an indicator outputting the HAs current status or can I say call them up directly in OL to see when say HA bars transit to green from red?

[Edited by JB on 11/20/2019 3:41 PM]

^ Top
Jim Dean

Sage
2000100010010025
Posts: 3242

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

User Profile
 
Subject : RE: Bar type specification for system or indicator
Posted : 11/20/2019 4:20 PM
Post #30643 - In reply to #30642

If I understand you correctly, then the MT functions could call a function that’s keyed to HA bars, to determine red or green. Might be as simple as MTR(“math.sign(C-O)”,ha-ref,1)
That would return +1 for a green HA bar, -1 for a red one, or 0 for a (very rare) doji.

I haven’t tested this. It’s my presumption that any oscript formula can be used as the initial argument of the MT call.

[Edited by Jim Dean on 11/20/2019 4:24 PM]

^ Top
JB

Legend
100100100100
Posts: 407

Joined: 6/6/2006

User Profile
 
Subject : RE: Bar type specification for system or indicator
Posted : 11/20/2019 4:46 PM
Post #30644 - In reply to #30642

Jim Thanks for your help I am not quite sure of the code (" marks and math.sign(c-o)" that you are proposing.

Suppose we made a simple sys that gave a long signal for every HA green bar.
I presume it would look something like this :-

if MTR(“math.sign(C-O)”,ha-ref,1) = 1 then
Signal=longsignal

Could you straighten this up so that I can give it a try as it does not function in this format and I presume you were indicating a variable inside the quote about which I am unsure
^ Top
Jim Dean

Sage
2000100010010025
Posts: 3242

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

User Profile
 
Subject : RE: Bar type specification for system or indicator
Posted : 11/20/2019 4:50 PM
Post #30645 - In reply to #30644

Sorry. Not at PC and no access to help manual. Just look up the proper syntax. The math.sign(C-O) works as described.
^ Top
JB

Legend
100100100100
Posts: 407

Joined: 6/6/2006

User Profile
 
Subject : RE: Bar type specification for system or indicator
Posted : 11/20/2019 4:55 PM
Post #30646 - In reply to #30642

Thanks Jim I will see what I can come up with.
^ Top
JB

Legend
100100100100
Posts: 407

Joined: 6/6/2006

User Profile
 
Subject : RE: Bar type specification for system or indicator
Posted : 11/20/2019 5:07 PM
Post #30647 - In reply to #30642

There does not seem to be any ref to Ha in the formula build look ups so perhaps I am misunderstanding or out of luck.
^ Top
Jim Dean

Sage
2000100010010025
Posts: 3242

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

User Profile
 
Subject : RE: Bar type specification for system or indicator
Posted : 11/20/2019 5:19 PM
Post #30648 - In reply to #30647

HA bars are simply another timeframe that you load in via data periods. IIRC there is a canned alpha reference you can use with MT like HD for daily or whatever. Or you can use MTR and specify the HA bars you loaded with the appropriate +/-# spec.
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.