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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    220 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    135 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    150 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    235 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    193 views
    0 likes
    Last Post CarlTrading  
    Working...
    X