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
plotting a horizontal line exact time of bar
Last Activity 10/18/2019 10:49 AM
4 replies, 231 viewings

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

^ Top
ap·pren·ticeGuru

Regular
252525
Posts: 95

Joined: 10/22/2010
Location: Columbia, MD

User Profile
 
Subject : plotting a horizontal line exact time of bar
Posted : 7/19/2019 6:05 PM
Post #30483

Hi All,

I am looking for a simple OL code that plots a horizontal line based of a "specific time" at Close when a user input in the parameter.

For example, a horizontal plot drawn at Close of the bar, when user inputs - 10:00a.m., or, 16:00, or whatever "time" user choice in the parameter.

Thanks.
^ Top
ap·pren·ticeGuru

Regular
252525
Posts: 95

Joined: 10/22/2010
Location: Columbia, MD

User Profile
 
Subject : RE: plotting a horizontal line exact time of bar
Posted : 7/20/2019 11:12 AM
Post #30484 - In reply to #30483

Hello,

I tried the following, its not plotting, with no error in code. Any clues. Thanks.

#Indicator

'BarHour()=09 and BarMinute()=50 works as OmniScript

#param "BarHr", 9
#param "BarMn", 50

Dim Bhr, As Integer
Dim Bmn As Integer

BarHr = BarHour()
BarMn = BarMinute()

PlotPrice("HorizontalTime1", BarHr and BarMn)


Return 0 ' Return the value calculated by the indicator


[Edited by ap·pren·ticeGuru on 7/20/2019 11:43 AM]

^ Top
THOMAS HELGET

Legend
50025
Posts: 537

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: plotting a horizontal line exact time of bar
Posted : 7/20/2019 2:29 PM
Post #30485 - In reply to #30484

ap·pren·ticeGuru:

Here you go - this resets the next day at the time you specified and the value plotted is the close at the specified time:



Hope that is what you envisioned.

Tom Helget

[Edited by THOMAS HELGET on 7/20/2019 2:31 PM]

Attached file : Time Plot.jpg (184KB - 105 downloads)
Attached file : indTimePlot.txt (0KB - 41 downloads)

^ Top
ap·pren·ticeGuru

Regular
252525
Posts: 95

Joined: 10/22/2010
Location: Columbia, MD

User Profile
 
Subject : RE: plotting a horizontal line exact time of bar
Posted : 7/21/2019 8:03 AM
Post #30486 - In reply to #30483

Hello Tom:

Wow, did not realize there were xtra steps in the code, nice short learning course. It works great !!! Thanks a bunch.
^ Top
THOMAS HELGET

Legend
50025
Posts: 537

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: plotting a horizontal line exact time of bar
Posted : 7/21/2019 10:41 AM
Post #30487 - In reply to #30486

ap·pren·ticeGuru:

Glad it is what you wanted - I wasn't quite sure.

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