Coding help for Pi bridge

Can anyone please provide a sample afl for use with Pi bridge to scan multiple symbols or a watchlist in Amibroker. When i scan in automatic analysis Pi bridge generates signals but the symbol remains the same only the price of different stocks are updated in Pi. I tried using the following codes, which i read about but when inserted in afl, the afl stopped generating signals.

Symbol = StrFormat(Name()+”-EQ”);//

Qty = ceil(50000/lastvalue(c,1));
Buyprice = Valuewhen(Buy,C);

brd.PlaceOrder (“NSE”, Symbol ,”NIFTY”,”STRATEGYNAME”, 1,Qty,0, Lastvalue(Buyprice,1), 0, “L”, “NRML”,
“DZ1105″,”DAY”);

I am new to coding so anyone with the solution please help me out.

For the above requirement you can check this below given sample code for Pi bridge - Amibroker AFL
 

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Buy = Cross (EMA( Close, 20 ), EMA( Close, 50 )) ;
Sell = Cross (EMA( Close, 50 ), EMA( Close, 20 )) ;
Short = Sell;
Cover = Buy;

PlotShapes (Buy*shapeHollowStar,colorGreen);
PlotShapes (Sell*shapeHollowStar,colorRed);
Plot( EMA( Close, 20 ),"med ema", colorRed,styleThick); 
Plot( EMA( Close, 50 ),"long ema", colorBlue,styleThick); 

//SL
Start_Trading = ParamToggle("Start Trading", "No|Yes",1);
//Bridge++

brd=Null;
if(IsNull(brd))
{
brd = CreateStaticObject("pibridge.Bridge");
}
if(!brd.GetConnectionStatus()) brd.Reconnect();

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

currTimestamp = LastValue( TimeNum() );
LastTimestamp = Nz( StaticVarGet("LastBarTimestamp_"+Name()+"_" +GetChartID()) );
if ( currTimestamp !=  LastTimestamp  )
{
StaticVarSet( "LastBarTimestamp_"+Name()+"_" +GetChartID(), currTimestamp );   

Start_Trading = ParamToggle("Start Trading", "No|Yes",1); 
 
if(LastValue(Buy) AND Start_Trading==1)
{
price = LastValue(C,1);
brd.PlaceOrder("NFO", "NIFTY15NOVFUT", "NIFTY","STRATEGY-S", 1,75, 1, price, 0, "L", "NRML", "DS2941","DAY");
{
sbprice = LastValue(C-10,1);
brd.PlaceOrder("NFO", "NIFTY15NOVFUT", "NIFTY","STRATEGY-S", 2,75, 1, 0, sbprice, "SL-M", "NRML", "DS2941","DAY");
}
}
if(LastValue(Sell) AND Start_Trading==1)

{
price = LastValue(C,1);
brd.PlaceOrder("NFO", "NIFTY15NOVFUT", "NIFTY","STRATEGY-S", 2,75, 1, price, 0, "L", "NRML", "DS2941","DAY");
{
ssprice = LastValue(C+10,1);
brd.PlaceOrder("NFO", "NIFTY15NOVFUT", "NIFTY","STRATEGY-S", 1,75, 1, 0, ssprice, "SL-M", "NRML", "DS2941","DAY");
}
}
} 

//Bridge++