List scan trigger date in an exploration

First off - i tried finding this topic on google search as well as this forum. Searched for “trigger date”, “find signal date”, etc. I didnt find information relevant to this.

I’d like the exploration page to show the dates when signal was triggered. For example if i use MACD as example, i like a column in the exploration with the cell having the date when that signal (buy or sell was triggered).

I would really appreciate help on this since i think it is very useful to see the date so that one can sort it by that and see a list of stocks.

please help.

Thanks
Narahari

Buy = // your code 

Sell = // your code

Filter = Buy OR Sell ;

AddColumn( Buy, "Buy", 1 );
AddColumn( Sell, "Sell", 1 );

First off,
codejunkie - THANK YOU so much! i really appreciate your effor to help!.

I tried it and it kind of did but not what i was hoping. Can you please check this out.
Please run an exploration with the code below. It will show you test1 - output as the image i have uploaded.
what i want is in the column EMA-50x200 - i'd like instead of writing bullish or bearing, i like to see the date there that the signal was triggered. it will be good to see green with a date, red with a date.
makes sense?

can you please share your thoughts with that? my hope is to add more code, more signal columns and it will be good to see for each signal the date in that respective column.

thanks!!

//EMA-50 x 200
MA3buy = Cross(EMA(C,50), EMA(C,200));
MA3sell= Cross(EMA(C,200),EMA(C,50));
MA3buy = ExRem(MA3buy, MA3sell);
MA3sell = ExRem(MA3sell, MA3buy);
MA3 = EMA(C,50) > EMA(C,200);
MA33 = EMA(C,50) < EMA(C,200);
MA3_status= WriteIf(MA3buy, "Buy", WriteIf(MA3sell, "Sell", WriteIf(MA3, "Bullish", WriteIf(MA33, "Bearish","Zilch"))));
MA3_Col=IIf(MA3buy OR MA3, colorGreen, IIf(MA3sell OR MA33, colorRed, colorLightGrey));

Filter=MA(V,21)>50000 AND Close > 10;
Chg = ROC( C, 1 ); //one bar yield 
Buy=Filter;

AddColumn(C, "Close", 1.2, IIf(C > Ref(C,-1), colorGreen, colorRed),-1); 
AddColumn(Chg, "Change", 1.2, IIf(Chg > Ref(Chg,-1), colorGreen, colorRed),-1);
AddColumn(V, "Volome", 1, IIf(V > Ref(V,-1), colorGreen, colorRed),-1);
AddColumn(((V/EMA(Ref(V,-1),10)))*100, "VolSpike %", 1.2, IIf(V> EMA(Ref(V,-1),10), colorBlue, colorRed),-1);
AddTextColumn(MA3_status, "EMA-50x200", 1.6, colorWhite, MA3_Col,-1);