Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar with a stem definition

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

    Bar with a stem definition

    Hi,
    I'm wandering if there is any ready formula to specify that the bar should have a stem e.g. bottom stem to be at least 50% of the body and upper stem not be bigger than 30% of the body?
    If so then could you please provide one?
    Thank you

    #2
    Hello Ludwik,

    Thank you for your post.

    You'd have to calculate that from the direction of the bar and the difference between the open/close and high/low depending on the bar direction.

    So something like this for a up bar:

    if (Close[0] > Open[0]
    && (Open[0] - Low[0]) >= (Close[0] - Open[0] * .5)
    && (High[0] - Close[0]) <= (Close[0] - Open[0] * .3))
    {
    // do something here
    }

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks a lot Kate, that's soo helpfull!!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X