Streak 5 min candle

I want to create first 5 min green candle buy for that I have created code

Opening rang (close,5 min) higher than opening rang (open,5min)

But in backtest it’s showing buy on second candle close

Can you tell me the code for same

In screenshot 9:15 candle close 495.95 and it’s trigger on 497.35

@Streak can you.

@Streak please help

Hi @Abhinav_M,
You can use this condition
Nth candle(Close,5min,1) higher than Nth candle(Open,5min,1)

1 Like

Thank you @Krishnendu

But I want it’s get trad when 1 candle High brack

Now it’s get trad on 1 St candle

@Krishnendu

Please help

1 Like

This is not happening on the first candle. Your strategy backtest transaction details would indicate that the entry is taking place at 9:15, which means entry would happen at the close of the first candle since the timeframe is 5min, the signal would get generated at 9:20 AM. This rule is applicable for all strategy backtests.

In the backtest transaction details, the Open time of the candle is shown. If it was 9:20 AM in transaction details, and the timeframe is 5min, it means entry would get generated at 9:25 AM