Highest Gain / Loss of the day

Forums ProRealTime English forum ProOrder support Highest Gain / Loss of the day

  • This topic has 5 replies, 2 voices, and was last updated 8 years ago by avatarCKW.
Viewing 6 posts - 1 through 6 (of 6 total)
  • #16647
    CKW

    Hi Guys,

    May I check with you guys how do you code market the Highest Gain / Loss of the day?

    Eg. DAX 5 Mins
    HighestGain = Dhigh(0) – Dclose(1)
    Highestloss = Dlow(0) – Dclose(1)

    Above coding are working on indicator (means result expected) but I noticed not really work on Probacktest. (Do you have the same issue Or maybe I am wrong?)

    Very appreciate if can you share me how do you code it? 🙂

    Br,
    Ckw

    #16661

    Correct me if I’m wrong, but you want to know what is the maximum and minimum distance the instrument has met in a 5 minutes timeframe for instance?

    About the fact that you think it did not work with probacktest, did you try to GRAPH your 2 variables to see what they returned?

    #16664
    CKW

    Hi Nicholas,

    I want to know the highest + / – changes so vs yesterday price close. I am using Dax 5 Mins as example.

    I tried to Graph using indicator mode, it shows correct value es expected

    Dclose(1) = yesterday close

    Dhigh(0) = The highest High of current day

    Dlow(0) = The lowest Low of current day

    BUT when I do the same on Probacktest. Apparently, it gives different result.

    #16674

    Before giving you another way to retrieve this values, did you add these specific lines into your probacktest code and verify them on chart after have launched a backtest?

    Sorry to insist, but I expect this to work correctly .. that’s why I don’t understand 🙂

    #16697
    CKW

    Hi Nicholas,

    Graph feature is new to me. Glad to know from you such feature will be useful for debugging. (I am using IG PRT 10.2)

    I will try tonight

    br, CKW

    #16727
    CKW
    Hi Nicholas,
    I tested with your advice. However, this is what i found out & worth to share here.
    The confusing part is on Monday IF your strategy is sensentive to the market changes 🙂
    For Mon Dclose(1),
    This value is taken from the close price of 00:55:00 on Mon but not last friday. In consequence, Dhigh(0) – Dclose(1) result will not be the same as the one in PRT chart “Prev Day Close”. The correct way to code is “Dhigh(0) – Dclose(2)”  (Dclose(2) is the close price of last friday 23:55:00, which is the last candle of friday)
    For Tues – Fri,
    Dclose(1) is taken from the close price of 00:55:00.We can keep it as “Dhigh(0) – Dclose(1)”.
    Br,
    CKW
Viewing 6 posts - 1 through 6 (of 6 total)

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