High Low Mid during trading hour

Forums ProRealTime English forum ProOrder support High Low Mid during trading hour

Viewing 15 posts - 1 through 15 (of 16 total)
  • #227899

    Hi All,

    Can anyone help me to find the highest, lowest point and middle point during my trading hour, since I find that DHigh or Dlow record the highest point or lowest point before the trading hour, and my trading hour is 091500 to 030000.

    Thanks in advance.

     

    #227917
    JS

    Hi,

    From 091500 to 030000 is 17.75 hours or 71 x 15 minutes.

    When using a 15-minute timeframe:

    TimeFrame(15 minutes)

    If Time=030000 then

    xHighest=Highest[71](High)

    xLowest=Lowest[71](Low)

    EndIf

    xMiddle=(xHighest + xLowest)/2

    Return xHighest as “Highest”, xLowest as “Lowest”, xMiddle as “Middle”

    #228022

    Hi JS,

    Thank you for reply.

    Since I am using 1 minute time frame, and I want to have these high, low and middle during the trading hour, can you amend the code for me with thanks in advance.

    #228110
    JS

    Hi Annchow,

    If you want the indicator to be “Live”, you will have to choose a certain look-back period…

    Try this… (period subject to change)

    #228126

    Hi JS,

    Thanks for your kindness and quick support .

    It is working good.

    #228128

    Hi JS,

    Further to my study, I find that the highest point have something wrong which record the highest point  before 9:15, can you help me to amend it with thanks.

     

    #228130

    Hi JS,

    Further to my study, I find that it record the highest point and lowest point during the 03:00 to 09:15 at the beginning of the trading hour.  Please help me to amend it with thanks.

    #228140
    JS

    Hi Annchow,

    I’m a bit confused because you write in the beginning that you want to have the values during your trading hours (091500-030000)…

    So the indicator only shows the values during your trading hours and beyond that it is “just” the High and the Low of the price…

    #228142

    Hi JS,

    Sorry for any confusion.  Actually, I want to have the highest , lowest and middle point during my trading hour, however, your code provide me the highest or lowest point is not correct, it record the wrong highest point or lowest point especially during the beginning of the trading hour, please check with the pictures provided, please amend it for me with thanks.

    #228145
    JS

    Hi Annchow,

    The code works with a certain look-back period, at the beginning (091500) this look-back period will also be used, (with data from before 0915000) and the output will be influenced by this…

    This is inevitable or you must leave the beginning blank until only date from after 0915000 is used…

    Hope it’s clear…

    #228159

    Hi JS,

    Noted with many thanks for your kindness support.

    1 user thanked author for this post.
    avatar JS
    #228168

    Hi JS,

    Is it possible to design a loop to eliminate the look back ?

     

    #228170
    JS

    Hi Annchow,

    In the PRT settings, try to set your trading times to your “trading hour” so that you only work with these times and automatically create the “Loop” you are talking about…

     

    #228179

    Hi JS,

    Further to my trying to reset the trading hour, it is quite difficult and not easy to setup after trial.  Thanks for your support .

    #228211

    Hi,

    Currently in prooder forum, that’s ok if you’re after a code snippet to include without a “return” line in a backtest/automatic strategy and are just visualising the code behaviour through an indicator, but in case you just wanted an indicator in the first place (please confirm) then I would move the topic to the probuilder forum.

    I hope I didn’t misunderstand the query, my understanding is you want customised highest and lowest (and their middle) starting at 9:15 in the morning, and going all the way to 3AM, and want to ignore what happens between 3 in the morning and 9:15 in the morning, with a code that works for 1 mn timeframe, is that correct? If yes, maybe you could try this:

     

     

    1 user thanked author for this post.
    avatar JS
Viewing 15 posts - 1 through 15 (of 16 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login