Announcement

Collapse
No announcement yet.

Open and Close are in top third of candle.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Open and Close are in top third of candle.

    Hi
    I am trying to change these 3 lines from Hammer indicator to my personal settings.
    If Open and close both are in top third of bar, I would like to see an arrow on that bar.


    if (High < Math.min(Open1, Close1) &&
    Math.abs(Open - Close) * 3 < (Math.min(Open, Close) - Low) &&
    (High - Math.max(Open, Close)) < 0.05 * (Math.abs(Open - Close)))

    Kindly help me out here please.


    Cheers

  • #2
    Rana
    The code in the image enclosed below will do what you are looking for
    Alex




    Originally posted by Rana View Post
    Hi
    I am trying to change these 3 lines from Hammer indicator to my personal settings.
    If Open and close both are in top third of bar, I would like to see an arrow on that bar.


    if (High < Math.min(Open1, Close1) &&
    Math.abs(Open - Close) * 3 < (Math.min(Open, Close) - Low) &&
    (High - Math.max(Open, Close)) < 0.05 * (Math.abs(Open - Close)))

    Kindly help me out here please.


    Cheers

    Comment


    • #3
      Thank you so much Alex. I tried to play with "3" and "0.05" above for 2 days as I was clueless and managed to get some desired arrows but you made it so obvious and simple for me. Spent 5 minutes with your suggested changes and looks all sorted now.

      Great Help.

      Cheers

      Comment


      • #4
        Rana
        You are welcome
        Alex


        Originally posted by Rana View Post
        Thank you so much Alex. I tried to play with "3" and "0.05" above for 2 days as I was clueless and managed to get some desired arrows but you made it so obvious and simple for me. Spent 5 minutes with your suggested changes and looks all sorted now.

        Great Help.

        Cheers

        Comment


        • #5
          Hi ACM,

          First of all thx for the code, this was very helpfull, now to add something to the code I want to print a price for example the price calculation is looking like this:

          ((high (0) - low(0))/2)

          but i'm not sure how to implement this.

          Comment

          Working...
          X