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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    84 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    66 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    69 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    58 views
    0 likes
    Last Post CarlTrading  
    Working...
    X