Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry candle identification indicator

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

    Entry candle identification indicator

    Dear NT8,

    I am hoping you can help me with a script to identify candle sticks. I am a complete noob when it comes to coding. However having this indicator will significantly reduce my time testing a strategy so i would like to give it a shot.

    I need an indicator that identifies the following:
    1. Candle closing between 6am-10am GMT
    2. Candle has to open and close below 50% of the overall candle.

    What is the best way to create an indicator for this?

    Many thanks,
    P

    #2
    Hi prasanttrades, thanks for posting. We have an example of making a time filter here, this uses the Time[] array to read the timestamp of the bar:



    To do operations on bar values, you must first read about how to access each price type (Documentation). The scripting language separates each price type into its own array, so we have Open, High, Low, and Close arrays that can be accessed. e.g. Close[0], Open[0], High[0], Low[0] returns the most recent price values of the candle. One can do math operations on these values e.g.

    Code:
    var x = High[0]*.5
    
    if(Close[0] < x && Open[0] < x)
    {
        Print("Signal");
    }
    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    72 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 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
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X