Today is my very first day to programming in Amibroker. Tried the below to buy a crude oil 1 contract. But getting a warning message and not sure how do I execute the below so that it will send a signal to Pi.
//API Details –
//PlaceOrder(string pExchnge, string pTrdSymbol, string pSymbol, string pUserStrategyName, short
//pOrderSide, int pInitialQty, int pDiscQty, double pLimitPrice, double pTriggerPrice, string pOrderType, string
//pProdType, string pClientCode, string pValidity)
//Example:
//_SECTION_BEGIN(“TEST”);
brd=Null;
if(IsNull(brd))
brd = CreateStaticObject(“pibridge.Bridge”);
}
//AFL Buy Logic
brd.PlaceOrder(“MCX”, “CRUDEOIL16MARFUT”, “MCXFUT”,“OILS1”, 1,1,0,2473,0,“L”,“NRML”,“XXXXXX”,“Day”);
_SECTION_END();