calculate % difference from candle high to candle low

Forums ProRealTime English forum ProOrder support calculate % difference from candle high to candle low

This topic contains 0 replies, has 1 voice, and was last updated by avatar jbyrne 2 years, 2 months ago.

Currently, there are 0 users and 2 guests visiting this topic.
View all attachments
Viewing 1 post (of 1 total)
  • #60918

    Hi, I’m working on prototyping a new indicator but I don’t know how to code it. I have tried multiple times but only attempt that got close wasn’t good enough.

    My indicator involves the following;

    Measuring the % distance between a candles high to low(low to high) within a 5 minute timeframe, with a 2 hour time limit. A position should then be opened if stock price reaches 50% of the previous % difference

    Bull Example;

    • (9:00am) stock price at high of 5 minute candle is 10
    • (9:30am) stock price at low of 5 minture candle is 9.9
    • % difference between 10 and 9.9 is -1%, which is past the minimum of 1%
    • % difference between 10 and 9.9 is -1%, therefore buy point is at 9.95 (+0.5%, since 10 – 0.5% = 9.95)
    •  (10:00am) stock price meets buy point at 9.95, long position is opened.

    Bear Example;

    • (9:00am) stock price at low of 5 minute candle is 10
    • (9:30am) stock price at high of 5 minture candle is 10.2
    • % difference between 10 and 10.1 is +1.9%, which is past the minimum of 1%
    • % difference between 10 and 10.1 is +1.9%, therefore buy point is at 10.1 (-0.5%) since: 10.2 – (1.9%/2) = 10.1)
    •  (10:00am) stock price meets buy point at 10.1, short position is opened since process took under 2 hours (start at 9:00am ends at 10:00am)

    Hope this is clear.

    Any help will be greatly appreciated. I have tried to code this myself many times using some knowledge I found on this forum but can’t get it to work properly. I used ‘summation’ repeated 14 times on 5 mintue timeframe which doesn’t seem like a good way of doing this. I wouldn’t be asking for help on this forum if I hadn’t already tried this myself already.

    Thanks in advance

Viewing 1 post (of 1 total)

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