Daily Open with spaced lines above and below, conversion code mq4 to prorealtime

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #64307 quote
    JaywalkerJaywalker
    Participant
    New

    Hi

    A simple indicator that draws the daily open price and then the option to draw lines above and below the open price by manually entering number of pips above and/or below price.

    I use it to measure volatility

    Many thanks

    Mike

     

     

    ProrealTime-indicator-picture-1.jpg ProrealTime-indicator-picture-1.jpg DailyOpen-1.mq4
    #64279 quote
    JaywalkerJaywalker
    Participant
    New

    Hi

    Indicator is very basic, daily open line is drawn with the option of pre-set lines ( manually enter number of pips) above and below the daily open.

    I use it for assessing volatility.

    Many thanks

    Mike

     

    ProrealTime-indicator-picture.jpg ProrealTime-indicator-picture.jpg DailyOpen.mq4
    #64540 quote
    NicolasNicolas
    Keymaster
    Legend
    This code should be good:
    distance = 20
    
    if intradaybarindex=0 then 
    oopen = dopen(0)
    up1 = oopen+distance*pointsize
    up2 = oopen+distance*2*pointsize
    dn1 = oopen-distance*pointsize
    dn2 = oopen-distance*2*pointsize
    endif
    
    return oopen, up1, up2, dn1, dn2
    You can modify the distance from the daily open for the 2 upper and 2 lower lines with the “distance” variable at the beginning of the code.
    Jaywalker thanked this post
    daily-open-with-extra-lines.png daily-open-with-extra-lines.png
    #64905 quote
    JaywalkerJaywalker
    Participant
    New
    many thanks Nicolas
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Daily Open with spaced lines above and below, conversion code mq4 to prorealtime


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Jaywalker @jaywalker Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by JaywalkerJaywalker
8 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/03/2018
Status: Active
Attachments: 5 files
ProRealCode ProRealCode
Loading...