Streak scan with open price of a current candle and not the close?

I just read on streak help that the scans which are run are based on the candle which we set in the algorithm, and the scans are executed at the close of the candle e.g if I select 15 min candle in algorithm then scans will be run at close of 15 min candle, how to run that scan at open of the candle immediately when the candle is started

@Streak Can you.

Hi @tejas168,

We access candle information only after the candle closes. Note that after a candle opens and before close the Open price can be High price or Low price as well, which we will only get to know after the candle closes.

If you want to run scan before a candle closes, you can run the scan manually at any point of time. Scanner considers last received price while checking condition. This means that the scan condition is run, it gives signal on the accumulated price action (candle open to scan time).

However, we are sending Live scanner alerts only when the candle closes. This cannot be done before candle closes.

Thank you, I got one solution to this, to scan on open price of candle, we can use ā€˜Closeā€™ value which is mostly the opening price of next candle.
Please confirm on this, for 15 min candle, when candle is closed the scan happens on that close price and enters into new candle is that right?

I donā€™t thing this would work.
Better you can try using ā€œmulti-time frameā€ , where on top in scanner you select 1min, and then build you scan using multi time frame functions, and specify 15mins in that.
In my understanding how it will work is at the close of every 1min candle it will scan, and form 15min candles from 1 min candles, and then instead of scanning at close of 15min, and you getting you results are 15min close, you will get your results 14minutes earlier.
Just a thought!

@TradeRocket your are correct, I tried the same, but the problem is that it keeps running unnecessarily for each 1min candle, that should not happen, it should only run for 1st 1 min candle after a 15 min candle closes.
So tried this solution, I think its working.

@Krishnendu as you specified, live scanner alerts are sent when candle closes, so for that close price in the scanner filter do we need to select indicator as ā€˜prev(0) closeā€™ or ā€˜prev(-1) closeā€™

Current candle Close can be referred to by Close(0), while Close(-1) can be used to refer to the previous candle Close price.

Prev N is also used for referring to the previous candle Close price with the additional flexibility of changing the timeframe of the previous candle.

Timeframe: 5min
Close(0) higher than Close (-1)

will check if the current 5 min candle Close price is higher than the previous 5min candle Close.

Timeframe: 5min
Close(0) higher than Prev N (Close, -1, 15min)

will check if the current 5 min candle Close price is higher than the previous 15min candle

If you want to learn more about the system, check out the Streak YouTube channel.

Hope this helps.

1 Like

@Krishnendu Please help with some more clarification here.

For 1 min.candle and manual scan at 10:42:27 (sample time)

  1. Prev N(Close, -1, 1min) wil mean closing price of 10:41 candle and Close(0) will mean price at 10:42:27? Right?

For same conditions but auto scan, result will be available at 10:43:01 and close (0) means closing price of 10:42 candle and Prev N(Close, -1, 1min) will mean closing price of 10:41.

Please correct me if I am wrong.

Also, is the same logic applied to calculate moving average?

This will run on the partially formed candle for at the moment the scan is run.
In auto scanning alerts, the conditions are only validated post the complete and formal formation of the candle(which includes waiting for a few seconds to be able to get and aggregate all the ticks) to be able the provide accurate and chart verifiable results. So auto scan alerts will validate conditions and generate alerts after 10:43.00 and it is the closing price of 10:42 candle i.e close(0) (based on chart time display, as charts show candle open time) as per you question.

Hope this clarifies.

Thanks @Krishnendu

Hi,

For the code, SELL 25 shares when Symbol(INDICES_NIFTY BANK, Close(0) higher than Nth candle(High,30min,2) ) for Candlestick Chart - 5 minutes,

Trade signal came at 10:35:15 AM on 08/02/2021 though the condition is not met as per the below image.
Please guide what data will be taken close(0) of a candle.

Thanks

Hi @Naveen_Reddy1,

Please write to [email protected] with the orderlog details and the name of the strategy so that they can help you with this.