Scan showing only one signal per Bar

Hi Everybody!! I am new to amibroker and trying to figure out how things work in amibroker. i am having following code:

SetOption("AllowSameBarExit", True);

Buy = Close < Nz (StaticVarGet("Last_Close")) ;

if (LastValue(Buy) == True)
	_TRACE("Buy @ "+BuyPrice);

Sell = Close > Nz (StaticVarGet("Last_Close"));

if (LastValue(Sell) == True)
	_TRACE("Sell @ "+SellPrice);

StaticVarSet("Last_Close", LastValue(close));

In "Analysis Settings" i have set periodicity to "Daily". When i "Scan" above code using Analysis window, i get 1 signal (either BUY or SELL) per Bar. Buy when i do "BAR REPLAY" with time frame "Daily" and step interval as "Hourly", i get several BUY and SELL signal on same Bar.

I believe that in real time trading also we will get several BUY and SELL signal on DAILY Chart on same Bar, but all these trades (signals) are not shown when we SCAN in Analysis window as we get only 1 signal per BAR.

My simple question is How can we get all the signals in SCAN result i.e multiple BUY and SELL signals on same BAR?

Instead of scan, try using "Explore". It allows more custom output.

Then you can debug as explained here

You will be able to peak in to each array and see all the signals that you are referring to.

Thanks @nsm51. In EXPLORATION also only 1 signal per BAR is shown. i want that all signals that are generated during BAR REPLAY must be shown in SCAN/EXPLORATION.

You'd have to look at setting your exploration/scan to hourly and look up Amibrokers timeframe functions.

Should understand "state signals" vs "pulse signals" if your looking for multiple buys.

Thanks, @Metamega. Even if I change periodicity to "HOURLY" in Analysis settings, EXPLORATION/ SCAN will show 1 signal per Hour/ BAR as shown below:
But in realtime trading BUY/SELL signals get generated with every tick. I want all those signals are shown in the SCAN/ EXPLORATION Result (i.e SCAN output should show all the signals generated during the day during realtime trading).

.... use tick data. Amibroker can only show one signal per bar. You have one data point and one signal. If you want want every signal on every tick, use tick data and tick as interval.

Thanks @Metamega !! I will try it...:+1::+1: