Get Buy/sell signal alert from Amibroker using PI bridge

Hi Zerodha,
To Get Buy/sell signal alert from Amibroker using PI bridge.I have done the beow steps,

1.Requested PI bridge and it is enabled.
2.Installed amibroker and strategy is ready.My strategy is giving buy and sell signals as shown below
image
3.installed PI bridge.
4.Changed 2 way Semiauto option.Now PI bridge icon in PI tool status is green color so i confirmed that connecivity between amibroker and PI bridge.
5.Below AFL code I have added in amibroker.

_SECTION_BEGIN(“Treasure Trading system”);
/////Treasure Trading System //////////
_SECTION_BEGIN(“PiBridge Test”);
brd=Null;
if(IsNull(brd))
{
brd = CreateStaticObject(“pibridge.Bridge”);
}
if(!brd.GetConnectionStatus()) brd.Reconnect();
brd.PlaceOrder(“NFO”, “NIFTY17AUGFUT”, “NIFTY”,“STRATEGY-S”, 1,1, 1, 7700.25, 0, “L”, “NRML”, “RB0799”,“DAY”);
brd.PauseCode(60); //Pause the code for 60 seconds
_SECTION_END();
_SECTION_END();

My problem is I am getting alerts every 0 sec from amibroker to PI generated alerts. I dont want want this one.I want alert whenever buy or sell signal generated.Could you please tell me what mistake i did here …Any coding mistake or some other mistake.

yes, as the above is just the sample code and it has defined to give alerts for every 60 seconds

if you want to get alerts on your afl you have to initiate the brd.PlaceOrder() function just below the buy and sell alerts in your AFL code
open your afl code and find the “buy =” or "sell = " and add the brd.PlaceOrder() function with necessary parameters

1 Like

Hello Selladurai_Rajan,

Can you please share the afl for the above mentioned “Treasure Trading System” or please point me to the source where i can get it.