Comment on Pi Bridge for Amibroker

CHOKS commented on 26 Jan 2015, 08:57 PM

Hi Just, Copy the Below Code and Paste at the end of your AFL i.e. before _SECTION_END();

When U Copy Paste from ZConnect, the Double Quotation mark will Change in AFL, So ReType all Double Quotation Marks after copy Paste.

I Hope This’ll work….Check it …..

Happy Trading


ClientId = “DP0012”;//Change As per Your client ID
TrdSymbol = “ICICIBANK15JANFUT”;//Change As per Your Symbol
Symbol = “ICICIBANK”;//Change As per Your Symbol
QYT = Param(“Lot Size?”,1,1,25,1);
Exch =ParamList(“Select Exch?”, “NFO|BFO|NSE|BSE|CDS|MCX” );
PType = ParamList(“Product Type?”, “MIS|NRML|CNC” );
OType = ParamList(“Order Type?”, “L|MKT|SL|SL-M” );

BuyP = LastValue(ValueWhen(Buy,C),1);
ShortP = LastValue(ValueWhen(Short,C),1);
SellP = LastValue(ValueWhen(Sell,C),1);
CoverP = LastValue(ValueWhen(Cover,C),1);

Checktwo = LastValue(BarIndex(),1);
OrdCond=LastValue(Buy) OR LastValue(Short) OR LastValue(Sell) OR LastValue(Cover);

Brd = Null;

if(OrdCond AND CheckOne != CheckTwo)
brd = CreateStaticObject(“pibridge.Bridge”);

brd.PlaceOrder (Exch, TrdSymbol ,Symbol,”MyAFL”, 1,Qty,0, BuyP, 0, OType, PType, ClientId,”DAY”);

brd.PlaceOrder (Exch, TrdSymbol,Symbol,”MyAFL”, 2,Qty,0, SellP, 0, OType,PType, ClientId,”DAY”);

brd.PlaceOrder (Exch, TrdSymbol,Symbol,”MyAFL”, 1,Qty,0, CoverP, 0, OType, PType, ClientId,”DAY”);

brd.PlaceOrder (Exch, TrdSymbol,Symbol,”MyAFL”, 2,Qty,0, ShortP, 0, OType,PType, ClientId,”DAY”);
StaticVarSet(“Check”,CheckTwo );

Alert = Buy OR Short OR Cover OR Sell;
AlertIf(Alert,”SOUND C:\\Windows\\Media\\Notify.wav”, “Audio alert”, 0 );


View the full comment thread »