Use </> code tag whenever you share codes. Please refer to:
Coming to what you want to procure, before anything else you need a database with Tick data or at the very least 1-sec snapshot data. Then from File > Database Settings you would need to set the Base time interval to 1-second or Tick.
On the basis of the code that you have shared, it is vague to subtract a value (20 secs) from TimeNum() in order to capture that bars Close. What if there was no tick 20 seconds ago!
Thank you Cougar for prompt response.
The problem with considering no. of preceding bars is that no. of bars are different in each minute for each symbol. For some symbol 20th preceding bar may be 60 second ago and for other script it may be 20 second ago. So I want to get value at predefined time before the condition. If there is no tick at that time (Say 20 second before condition), then the value of previous available tick(Say 27 seconds before condition) should appear. I have tried Exploration with Periodicity set to 1-Second , but still not getting desired result as at many instances no. of ticks are less 60 in one minute in most cases. Please let me know if there is way to get last close value 20 seconds before condition.
Also, is there any setting in Amibroker 6.30.5 to include bars with which do not have value. There are 22500 seconds in a trading day in India. If there are 22500 ticks are available then Periodicity set to 1-Second can work, but Indian data providers (Truedata and GDFL) provides less than 22500 ticks for each symbol.