Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Candle body size indicator or alert

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

    Candle body size indicator or alert

    Hi
    is there a alert of indicator to mark candle whose body size is twice than difference between high to low, so mainly looking to implement this formula for a red candle =>and (o<c,(c-o)>=(h-l)/2).
    thanks

    #2
    Hello nimo007,

    Welcome to the NinjaTrader forums!

    What are you referring to as the body size? Do you mean the Open minus the Close (or Close minus the Open)?

    By "twice the different between the high to low" are you meaning the High minus the Low[0] then multiplied by 2?

    (This would never be true for any bar. The absolute value of the Open minus the Close will always be less than or equal to the High minus the Low. Multiplying the difference of the High and the Low by 2 wouldn't matter, as this be an even larger number than the Open minus the Close)

    Even though this would never evaluate as true, I can provide the code of how this logic would appear in NinjaScript:

    if (Open[0] < Close[0] && Math.Abs(Open[0] - Close[0]) >= ((High[0] - Low[0]) * 2))

    Did you mean half or less of the distance between the high and low?

    if (Open[0] < Close[0] && Math.Abs(Open[0] - Close[0]) >= ((High[0] - Low[0]) / 2))

    Below is a link to a forum post with helpful resources on getting started with NinjaScript and C# if you would like to create this indicator yourself.
    https://ninjatrader.com/support/foru...pts#post786040

    I am not aware of any existing indicator with this specific logic, but this thread will remain open for any community members that may know of an existing one.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    2 views
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    1 view
    0 likes
    Last Post 00nevest  
    Started by Jonafare, 12-06-2012, 03:48 PM
    5 responses
    3,986 views
    0 likes
    Last Post rene69851  
    Started by Fitspressorest, Today, 01:38 PM
    0 responses
    2 views
    0 likes
    Last Post Fitspressorest  
    Started by Jonker, Today, 01:19 PM
    0 responses
    2 views
    0 likes
    Last Post Jonker
    by Jonker
     
    Working...
    X