highest value

Viewing 5 posts - 1 through 5 (of 5 total)
  • #15253
    Abz

    hello

    when using Dhigh(10) does this return the highest value 10 days ago or the highets value within 10 days? im looking for a variable that looks for the highest within a ceratin periode of time.

    #15256

    It will return the highest value 10 days ago.

    For the highest value within the 10 latest days:
    Newhigh=0
    FOR i = 0 TO 10 DO
    IF DHigh(i)>Newhigh THEN
    Newhigh = DHigh(i)
    ENDIF
    NEXT

    2 users thanked author for this post.
    #15268
    Abz

    if i want to check for highest candle 14 days back on a 5 min chart is this correct to tuse?

     

    #15291

    You don’t need to use 4032 periods lookback, since the daily OHLC can be retrieve from any timeframe with Dhigh, Dlow, etc..

    The solution H_kan gave you is a good one, you just need to replace “10” by “15” to make the loop 15 days back. H_kan could confirm too 🙂

    #15387

    Yes. It works like Nicolas says. DHigh always picks the highest daily value undependently of which timeframe you use. If you use 4032 in your code it will look 4032 days back!

Viewing 5 posts - 1 through 5 (of 5 total)

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