Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom candlestick formula

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

    Custom candlestick formula

    How can i execute the following custom candlestick identification formula in ninjascript

    (O1>C1) AND (C-O)>=0.7*(H-L)AND (C>O1) AND (H-L)>=1.5*(AVGH10-AVGL10)AND (H1-L1).>=0.7(AVGH10-AVGL10) AND (O1-C1).=)0.7*(H1-L1)

    where O1 indicated open 1 bar ago and so on .

    #2
    Hello,

    Thank you for the question.

    This would require some manual programming, I will post the items below in which would be needed to complete this statement if you want to try this yourself. Otherwise this would need to be created using NinjaScript.

    The various syntax you would need for this would be located in the NinjaScript reference here: http://ninjatrader.com/support/helpG..._reference.htm

    This statement would require a few different items, for the values you would use such as the Open of 1 bars ago, that would be:

    Code:
    Open[1]
    The basic syntax for if statements can be located in the sample here: http://ninjatrader.com/support/helpGuides/nt7/close.htm

    To combine multiple items, you could use the && sign which would look like the following when used in an if statements:

    Code:
    if (Close[0] > Close[1] && Close[1] > Close[2])
    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    88 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    31 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    34 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    69 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X