Previous Day Close, Mid ,Low , High on Intraday Candle

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #172026 quote
    oyinloyea
    Participant
    Veteran

    Can you please hep me code Previous Day Close, Mid ,Low , High on Intraday Candle on Price. I can code it on the Daily Candle but cant get it to work on Intraday Chart.

    Attach is the code I am using

    Thanks

     

    DefParam DrawOnLastBarOnly = true
    a1=High
    a2=Low
    a3=Close

    Daymid= (a1+a2)/2

    return Daymid as “Daymid”, a3 as “DayClose”, a1 as “DayHigh”, a2 as “DayLow”

    #172027 quote
    robertogozzi
    Moderator
    Master

    This is your code, slightly modify to achieve what you want:

    DefParam DrawOnLastBarOnly = true
    Timeframe(Daily,UpdateOnClose)
    a1=High
    a2=Low
    a3=Close
    Daymid= (a1+a2)/2
    Timeframe(default)
    return Daymid as “Daymid”, a3 as “DayClose”, a1 as “DayHigh”, a2 as “DayLow”

    DefParam DrawOnLastBarOnly = true will make no difference, as it is only used for objects plotted using graphical instructions (DRAW…..), not with RETURNed data.

    PLermite thanked this post
    #172033 quote
    oyinloyea
    Participant
    Veteran

    Thanks a million .

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Previous Day Close, Mid ,Low , High on Intraday Candle


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
oyinloyea @oyinloyea Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by oyinloyea
4 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/19/2021
Status: Active
Attachments: No files
Logo Logo
Loading...