Evgen (Автор тем)

Выбрать дату в календареВыбрать дату в календаре

Страницы: 1
Текущей остаток в depo_limits, Текущей остаток в depo_limits
 
Здравствуйте уважаемые господа, я новичок в программирование, только познаю. Подскажите пожалуйста, как вывести текущую позицию акций в таблицу с depo_limits. В futures_client_holding всё работает.

function PosNowFunc(secCode,acc)      
local nSize = getNumberOf("depo_limits")            
   if (nSize~=nil)then
       local lot = tonumber(getParamEx(Class, Emit, 'LOTSIZE').param_value)
       for i = 0, nSize-1 do
           local depo_limit = getItem("depo_limits",i)
           if(depo_limit~=nil
           and depo_limit.sec_code == secCode
           and depo_limit.trdaccid == acc)
           then        
                               --message("LOT")
           return  math.floor(depo_limit.currentbal/lot)                  
                   --math.floor(depo_limit.currentbal)  
                   --tonumber(depo_limit.currentbal/lot)
                   --depo_limit.currentbal
                   --depo_limit.sec_code
           end
       end
   end
   return 0

Если вставить depo_limit.sec_code, выводит код инструмента, но  с depo_limit.currentbal не выводит текущей позиции. Подскажете пожалуйста. где ошибка.
Страницы: 1
Наверх