PI birdge code required for following sample afl

Team,

I am able to connect pi bridge, but i unable to get signals from amibroker, tried all referred URLS and code mentioned in this forum but no luck, i am unable to see any generated alerts in PI window though semi automated option selected in settings, even tried amibridge dll way provided by choks link.

can any one post perfectly working firing bridge code to generate alters for following sample afl with example of NIFTY future DEC.

_SECTION_BEGIN(“ema3,15”);

x = EMA(Close,3);
y = EMA(Close,15);

Plot(EMA(Close,3),"",colorYellow, styleLine, styleThick);
Plot(EMA(Close,15),"",colorGreen, styleLine, styleThick);
GraphXSpace=0.5;
Plot(C,"",colorBlack,styleCandle);
XR=(EMA(Close,3) * (2 / 6 - 1) - EMA(Close,15) * (2 / 11 - 1)) / (2 / 6 - 2 / 11);

Buy = Close > EMA( Close , 15 )
AND Ref( Close , -1 ) > Ref( EMA( Close , 15 ) , -1 )
AND Cross(x,y);

Sell = Close > EMA( Close , 3 )
AND Open > EMA( Close , 3 );

Short = Close < EMA( Close , 3 )
AND Ref( Close , -1 ) < Ref( EMA( Close , 3 ) , -1 )

AND Cross(y,x);

Cover = Close < EMA( Close , 3 )
AND Open < EMA( Close , 3 );

SellPrice=ValueWhen( Sell, C, 1);
BuyPrice=ValueWhen( Buy,C, 1);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );

PlotShapes(shapeUpArrowBuy,colorBrightGreen, 0, L, Offset=-45);
PlotShapes(shapeDownArrow
Short,colorRed, 0, H, Offset=-45);
AlertIf( Buy, “SOUND C:\Windows\Media\notify.wav”, “Audio alert”, 2 );
AlertIf( Sell, “SOUND C:\Windows\Media\chord.wav”, “Audio alert”, 2 );
AlertIf( Cover, “SOUND C:\Windows\Media\notify.wav”, “Audio alert”, 2 );
AlertIf( Short, “SOUND C:\Windows\Media\chord.wav”, “Audio alert”, 2 );

_SECTION_END();

Try this modified below AFL Code

_SECTION_BEGIN("ema3,15");

x = EMA(Close,3);
y = EMA(Close,15);

Plot(EMA(Close,3),"",colorYellow, styleLine, styleThick);
Plot(EMA(Close,15),"",colorGreen, styleLine, styleThick);
GraphXSpace=0.5;
Plot(C,"",colorBlack,styleCandle);
XR=(EMA(Close,3) * (2 / 6 - 1) - EMA(Close,15) * (2 / 11 - 1)) / (2 / 6 - 2 / 11);

Buy = Close > EMA( Close , 15 )
AND Ref( Close , -1 ) > Ref( EMA( Close , 15 ) , -1 )
AND Cross(x,y);

Sell = Close > EMA( Close , 3 )
AND Open > EMA( Close , 3 );

Short = Close < EMA( Close , 3 )
AND Ref( Close , -1 ) < Ref( EMA( Close , 3 ) , -1 )

AND Cross(y,x);

Cover = Close < EMA( Close , 3 )
AND Open < EMA( Close , 3 );

SellPrice=ValueWhen( Sell, C, 1);
BuyPrice=ValueWhen( Buy,C, 1);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );

Buy = Cover;

Sell = Short;

PlotShapes(shapeUpArrow*Buy,colorBrightGreen, 0, L, Offset=-45);
PlotShapes(shapeDownArrow*Short,colorRed, 0, H, Offset=-45);
AlertIf( Buy, "SOUND C:\\Windows\\Media\\notify.wav", "Audio alert", 2 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );
AlertIf( Cover, "SOUND C:\\Windows\\Media\\notify.wav", "Audio alert", 2 );
AlertIf( Short, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );

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", "NIFTY15DECFUT", "NIFTY","STRATEGY-S", 1,1, 1, price, 0, "L", "NRML", "DS2941","DAY");
}941
if(LastValue(Sell) AND Start_Trading==1)

{
price = LastValue(C,1);
brd.PlaceOrder("NFO", "NIFTY15DECFUT", "NIFTY","STRATEGY-S", 2,1, 1, price, 0, "L", "NRML", "DS2941","DAY");
}

} 

//Bridge++

_SECTION_END();