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
    Jaywalker
    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

     

     

    #64279 quote
    Jaywalker
    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

     

    #64540 quote
    Nicolas
    Keymaster
    Master
    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
    #64905 quote
    Jaywalker
    Participant
    New
    many thanks Nicolas
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

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 Jaywalker
7 years, 11 months ago.

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