function dev() // в комментах гавнокод и попытки ='({ /*var order = new_object("hash"); order["quantity"] = 1; order["operation"] = OP_BUY; order["usecredit"] = true; //var trade = trade_action::transact(order); //signal::outputMultiple("trade: "+trade); trade_action::buy(1, ::lots);*/ var order = new_object("hash"); //order["price"] = limit_price; // Opening by limit price //dealer_SecInfo = getSecInfo(); //order["secid"] = dealer_SecInfo["secid"]; // Security's identificator order["quantity"] = 1; // Number of lots order["usecredit"] = true; // Use credit order["operation"] = OP_SELL; order["condition"] = COND_NONE; // No conditions order["condvalue"] = -1; var res = trade_action::transact(order); signal::outputMultiple("res : "+res);}function init(){ setTimer("dev", 1000, TIMER_AFTERDELAY);}
Напишите словами - что вы хотите от скрипта ?