How to Highlight a cell at Backtest Report referring to the sticker group

Hi, Friends
I would like to set a "newbuy1List" with 3 stocks and highlight their "profit or loss cell" in Analysis Report
I want to fill the cell with color referring to the assigned ticker list

e.g. newbuy1TickerList consist of NVDA & SMCI
WHen I doing explore 6 stocks.
I would like to color the "P&L" Box if the stock is in the newbuy1TickerList, look liks this pic

_N( newbuy1List = ParamStr( "Tickers1", "SMCI,MSFT,NVDA" ) );

AddColumn (newbuy1pnl,"1st 2wk P&L",1.2,IIf(newbuy1pnl>0,colorlime,colorred),IIf(newbuy1List ,colorBlue,null));

How to amend the code? Thanks!

list = "SMCI,MSFT,NVDA";

_N( newbuy1List = ParamStr( "Tickers1", list ) );

in_list = StrFind(","+list+",", ","+Name()+",");

newbuy1pnl = Cross(C, MA(C,20));

Filter = 1;

fnt_color =IIf(newbuy1pnl>0,colorlime,colorred);
bk_color = IIf(in_list ,colorBlue,colorDefault);

AddColumn (newbuy1pnl,"1st 2wk P&L",1.2, fnt_color, bk_color);

Thanks a lot!!!!!

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.