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
Hull MA indicator shown as bar color
Last Activity 11/20/2019 5:19 PM
3 replies, 129 viewings

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

^ Top
Daniel Wilson

Member
25
Posts: 43

Joined: 3/7/2006
Location: Moses Lake, WA

User Profile
 
Subject : Hull MA indicator shown as bar color
Posted : 10/18/2019 9:21 AM
Post #30550

I am trying to take the Hull MA and use it to have color change in the bars to show bullish and bearish conditions. Here's what I've tried so far but I'm getting an error message. Help please.
++++++++++++++++++++++++++++++++++++++++++++++++

#Indicator

#PARAM "period", 20

Dim Result As Single

if bar > period then
Result = WMA((2 * WMA(period / 2) - WMA( period )), SQRT( period ))
end if


if Result > Result[1] then
Bar( green)
else
Bar( red)
end if


Return Result 'Return the value calculated by the indicator
^ Top
Jim Dean

Sage
2000100010010025
Posts: 3242

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

User Profile
 
Subject : RE: Hull MA indicator shown as bar color
Posted : 10/18/2019 9:59 AM
Post #30551 - In reply to #30550

Bar(green) and Bar(red) are not valid in OLang

If you're plotting in an indicator, you could use a histogram:

plothist("Dirn",10,0,green,2)
else
plothist("Dirn",-10,0,red,2)

^ Top
Daniel Wilson

Member
25
Posts: 43

Joined: 3/7/2006
Location: Moses Lake, WA

User Profile
 
Subject : RE: Hull MA indicator shown as bar color
Posted : 10/18/2019 10:05 AM
Post #30552 - In reply to #30551

Thank you Jim!

I think I can do what I was wanting with Chart Options with bar color


[Edited by Daniel Wilson on 10/18/2019 10:11 AM]

^ Top
Jim Dean

Sage
2000100010010025
Posts: 3242

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

User Profile
 
Subject : RE: Hull MA indicator shown as bar color
Posted : 10/18/2019 10:49 AM
Post #30553 - In reply to #30552

yup you can do that too
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.