<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[QUIK -> DDE &mdash; как отменить стоп-заявки на forts]]></title>
		<link>https://quik2dde.ru/viewtopic.php?id=49</link>
		<atom:link href="https://quik2dde.ru/extern.php?action=feed&amp;tid=49&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «как отменить стоп-заявки на forts».]]></description>
		<lastBuildDate>Tue, 23 Apr 2013 09:31:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: как отменить стоп-заявки на forts]]></title>
			<link>https://quik2dde.ru/viewtopic.php?pid=296#p296</link>
			<description><![CDATA[<p>ясно, спасибо большое.</p>]]></description>
			<author><![CDATA[null@example.com (burunduk)]]></author>
			<pubDate>Tue, 23 Apr 2013 09:31:00 +0000</pubDate>
			<guid>https://quik2dde.ru/viewtopic.php?pid=296#p296</guid>
		</item>
		<item>
			<title><![CDATA[Re: как отменить стоп-заявки на forts]]></title>
			<link>https://quik2dde.ru/viewtopic.php?pid=295#p295</link>
			<description><![CDATA[<p>function killAllStopOrders(table_mask)<br />&nbsp; &nbsp; -- данная функция отправит транзакции на отмену АКТИВНЫХ стоп-заявок соответствующим фильтру указанному как входящий параметр table_mask<br />&nbsp; &nbsp; -- список всех возможных параметров&nbsp; : ACCOUNT,CLASSCODE,SECCODE,OPERATION,CLIENT_CODE,COMMENT<br />&nbsp; &nbsp; -- если вызвать функцию с параметром nil - снимутся ВСЕ активные заявки<br />&nbsp; &nbsp; local i,key,val,result_num=0,0,0,0<br />&nbsp; &nbsp; local tokill=true<br />&nbsp; &nbsp; local row={}<br />&nbsp; &nbsp; local result_str=&quot;&quot;<br />&nbsp; &nbsp; for i=0,getNumberOf(&quot;stop_orders&quot;),1 do<br />&nbsp; &nbsp; &nbsp; &nbsp; row=getItem(&quot;stop_orders&quot;,i)<br />&nbsp; &nbsp; &nbsp; &nbsp; tokill=false<br />&nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,&quot;Row &quot;..i..&quot; onum=&quot;..row.ordernum)<br />&nbsp; &nbsp; &nbsp; &nbsp; if stoporderflags2table(row.flags).active then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tokill=true<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,&quot;acitve&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if table_mask~=nil then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for key,val in pairs(table_mask) do<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,&quot;check key=&quot;..key..&quot; val=&quot;..val)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,&quot;strlowe=&quot;..string.lower(key)..&quot; row=&quot;..row[string.lower(key)]..&quot; tbl=&quot;..val)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if row[string.lower(key)]~=val then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tokill=false<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,&quot;false cond. t=&quot;..table_mask.key..&quot; row=&quot;..row[string.lower(key)])<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; if tokill then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,&quot;kill onum&quot;..row.ordernum)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res,ms=killStopOrder(tostring(row.ordernum),row.seccode,row.class_code)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result_num=result_num+1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --toLog(log,ms)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if res then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result_str=result_str..row.ordernum..&quot;,&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result_str=result_str..&quot;!&quot;..row.ordernum..&quot;,&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; end<br />&nbsp; &nbsp; return true,&quot;QL.killAllStopOrders(): Sended &quot;..result_num..&quot; transactions. Ordernums:&quot;..result_str<br />end</p><p>Фукнция из библиотеки QL. [url=http://forum.qlua.org/topic5.html]Ссылка[/url]</p>]]></description>
			<author><![CDATA[null@example.com (patch_ua)]]></author>
			<pubDate>Tue, 23 Apr 2013 08:23:42 +0000</pubDate>
			<guid>https://quik2dde.ru/viewtopic.php?pid=295#p295</guid>
		</item>
		<item>
			<title><![CDATA[Re: как отменить стоп-заявки на forts]]></title>
			<link>https://quik2dde.ru/viewtopic.php?pid=294#p294</link>
			<description><![CDATA[<div class="codebox"><pre><code>function KillAllStops(ClassCode,SecCode)

    local ord = &quot;stop_orders&quot;
    for i=0,getNumberOf(ord) do
        local t=getItem(ord, i)
        if t ~= nil and type(t) == &quot;table&quot; then
            if( t.seccode == SecCode and orderflags2table(t.flags).active == 1) then
                local transaction={
                    [&quot;TRANS_ID&quot;]=tostring(math.random(2000000000)),
                    [&quot;ACTION&quot;]=&quot;KILL_STOP_ORDER&quot;,
                    [&quot;CLASSCODE&quot;]=ClassCode,
                    [&quot;SECCODE&quot;]=SecCode,
                    [&quot;STOP_ORDER_KEY&quot;]=tostring(t.ordernum),
                }
                local res=sendTransaction(transaction)
                if res~=&quot;&quot; then
                    return nil, &quot;qlib.KillAllStops():&quot;..res
                else
                    return trans_id, res
                end    
            end
        end
    end    
   
end</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (sam)]]></author>
			<pubDate>Tue, 23 Apr 2013 07:02:25 +0000</pubDate>
			<guid>https://quik2dde.ru/viewtopic.php?pid=294#p294</guid>
		</item>
		<item>
			<title><![CDATA[как отменить стоп-заявки на forts]]></title>
			<link>https://quik2dde.ru/viewtopic.php?pid=293#p293</link>
			<description><![CDATA[<p>Как отменить все стоп-заявки на forts? Я написал функцию, где ACTION равно KILL_ALL_STOP_ORDERS, но она почему-то неработает, вообще никакой реакции.</p>]]></description>
			<author><![CDATA[null@example.com (burunduk)]]></author>
			<pubDate>Mon, 22 Apr 2013 15:35:58 +0000</pubDate>
			<guid>https://quik2dde.ru/viewtopic.php?pid=293#p293</guid>
		</item>
	</channel>
</rss>
