Биржевой Стакан на языке QLUA, Когда писал код наткнулся на одну проблему, весь код написан правильно,но почему-то программа выдает не полностью все таблицы
local stopped = false function OnStop() stopped = true return 2000 end
--Создание Таблицы function main() local Table = AllocTable() AddColumn(Table,1,"Offer Vol",true, QTable_INT_TYPE, 15) AddColumn(Table,2,"Offer Price",true, QTable_INT_TYPE, 15) AddColumn(Table,3,"Bid Vol", true, QTable_INT_TYPE, 15) CreateWindow(Table) SetWindowCaption(Table,"Стакан котировок") SetWindowPos(Table,0,10,300,100) local RowN=2 for i=1,RowN,1 do InsertRow (Table,-1) end local Offer_Vol local Offer_Price local Offer_Count local Bid_Vol local Bid_Price local Bid_Count local Quotes = {} local SecCode ="SPBFUT" while stopped == false do Quotes = getQuoteLevel2("SRU9",SecCode) Offer_Count = tonumber (Quotes.offer_count) Bid_Count = tonumber (Quotes.bid_count) if Offer_Count > 0 then Offer_Vol = tonumber (Quotes.offer[1].quantity) Offer_Price = tonumber (Quotes.offer [1].price) SetCell (Table,1,1, SecCode) SetCell (Table,1,2,tostring(Offer_Price)) end if Bid_Count > 0 then Bid_Vol = tonumber (Quotes.bid[Bid_Count].quantity) Bid_Price = tonumber (Quotes.bid[Bid_Count].price) SetCell(Table,2,2,tostring(Bid_Price)) SetCell(Table,2,3, tostring (Bid_Vol)) end sleep(100) end end
При запуске программы не показывает значения, которые написанные в коде: AddColumn(Table,1,"Offer Vol",true, QTable_INT_TYPE, 15) AddColumn(Table,2,"Offer Price",true, QTable_INT_TYPE, 15) AddColumn(Table,3,"Bid Vol", true, QTable_INT_TYPE, 15)
Программа запускается так: [img]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASsAAABlCAYAAAAVgcUcAAAUmElEQVR4Ae2dC5QU1ZnHv37BDPIWFBweouAqyuICrjCyKysiJ5F1dYUVmWQVluMeJHs8Pk5cE1FMZD14otFDiCTHKJJEV5G4bDBElIhnVRQRB0VdXg4TmAHCQ0aEGWamZ/b7bvWtqu6u2zWT7a5qZv53TndX3cf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aWpPbVj4lldOV3pzxDe2SDAAiAQHsImMZNjlgZamiR0q/tcYq6IAACINBeAr4jK5NBS6T4vp4YWZkQIR8EQCAAAvbISi+wW8vpzjBLRAoL7AEcCbgAARBIEXD0x43EFqv0kZPIk5XqT35NO7Zv17uBvZaVlQXmC45AAASKh0C6Fjlx2WJ16Hj6Fepa20aMGGH8bxOOmfxvnThxIv9GYREEQKDoCXhrUdy5zup4ffa90aVXb35+LMTOHQrRN1yDAAiEQcBLiw5GThJ+nRzG0YBPEACBdhOAWLUbGRqAAAiEQQBiFQZ1+AQBEGg3AYhVu5GhAQiAQBgEIFZhUIdPEACBdhNQly5cVFnT7oZoAAIgAAJBEpDLqZwrQIP0DF8gAAIg0A4C/wdCZbBLn0py4AAAAABJRU5ErkJggg==[/img]
Сверху должна была появится строка с Offer_Vol Offer_Price Bid_Vol. которая выводила бы значения по инструменту.