

 <mf-xml>
	<block ID="12713442130" Active="1" Name="Ставки ПРОТИВ по критерию Келли" Repeat="0.00" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>12713442130</BlockID>
				<Active>5</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94456858949397724</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>инициализация переменных</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.00</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>32</Action>
					<Persistence>-1</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>mkt_num</Price>
					<Amount>0</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>0</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>1</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>avg_sum</Price>
					<Amount>0</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>0</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>fav_wns</Price>
					<Amount>0</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>0</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<conditions>
					<tblck AndOr="0" Order="0">
						<blcks/>
						<conds/>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>12713442130</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>96613938807568852</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>6</MarketStatus>
				<Name>в конце события</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>mkt_num</Price>
					<Amount>mkt_num+1</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>0</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>avg_sum</Price>
					<Amount>avg_sum + last_layp</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>0</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>fav_wns</Price>
					<Amount>fav_wns + IF(sel_place&gt;0, 1, 0)</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>0</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<conditions>
					<tblck AndOr="1" Order="0">
						<blcks/>
						<conds>
							<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="fav_rank" TriggerID="0" BetTriggerID="0" SecondParam="last_order" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="0" Param="61" CondIndex="3" Value2="" Value1="0" TriggerID="0" BetTriggerID="0" SecondParam="sel_place" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="1" TriggerID="0" BetTriggerID="0" SecondParam="track_wl" Overall="0" RereadFile="0" Order="3"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>12713442130</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94456858949397725</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>6</MarketStatus>
				<Name>вычисление ср. коэф. и частоты выигрышей</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.00</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>32</Action>
					<Persistence>-1</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>avg_odds</Price>
					<Amount>avg_sum/mkt_num</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>0</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>1</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>s_rate</Price>
					<Amount>fav_wns*100/mkt_num</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>0</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<conditions>
					<tblck AndOr="0" Order="0">
						<blcks/>
						<conds>
							<condition AndOr="1" Body="1" Param="61" CondIndex="5" Value2="" Value1="min_depth" TriggerID="0" BetTriggerID="0" SecondParam="mkt_num" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="1" TriggerID="0" BetTriggerID="0" SecondParam="track_wl" Overall="0" RereadFile="0" Order="2"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>12713442130</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94456858949397726</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>вычисление вероятности выигрыша</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.3</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>32</Action>
					<Persistence>-1</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>expectation</Price>
					<Amount>(1 - s_rate/100)*(1-commission) - (s_rate/100)*(lay_price-1)</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>0</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>1</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>1</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<conditions>
					<tblck AndOr="0" Order="0">
						<blcks/>
						<conds>
							<condition AndOr="1" Body="1" Param="28" CondIndex="0" Value2="" Value1="fav_rank" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="8" Param="63" CondIndex="4" Value2="" Value1="mins_before_start" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>12713442130</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94456858949397727</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>ставки ПРОТИВ</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.00</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>1</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>lay_price</Price>
					<Amount>((expectation/divisor)*my_funds)/((1-commission)*(lay_price-1))</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>0</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>0</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>1</GreenupLastPrice>
					<CancelFirst>0</CancelFirst>
					<CancelOptions>
						<OptNoBet>0</OptNoBet>
						<OptPersistence>0</OptPersistence>
						<OptPersistenceValue>0</OptPersistenceValue>
						<OptAmount1>0.01</OptAmount1>
						<OptAmount2>10000000</OptAmount2>
						<OptPrice1>1.01</OptPrice1>
						<OptPrice2>1000</OptPrice2>
					</CancelOptions>
					<TriggerID>0</TriggerID>
				</ActionSet>
				<conditions>
					<tblck AndOr="0" Order="0">
						<blcks/>
						<conds>
							<condition AndOr="1" Body="1" Param="28" CondIndex="0" Value2="" Value1="fav_rank" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="61" CondIndex="3" Value2="" Value1="0" TriggerID="0" BetTriggerID="0" SecondParam="expectation" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="8" Param="53" CondIndex="34" Value2="" Value1="" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
							<condition AndOr="1" Body="1" Param="1" CondIndex="6" Value2="avg_odds*(1 + max_deviation/100)" Value1="avg_odds*(1 - max_deviation/100)" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="divisor" value="5" descr="Делитель (число, на которое нужно разделить ставку)" saveValue="0"/>
		<const name="avg_odds" value="8.5" descr="Начальное значение среднего коэффициента" saveValue="0"/>
		<const name="s_rate" value="4" descr="Начальное значение частоты выигрыша" saveValue="0"/>
		<const name="fav_rank" value="3" descr="Ранг фаворита, против которого ставить" saveValue="0"/>
		<const name="mins_before_start" value="0.5" descr="За сколько минут до начала сделать ставку" saveValue="0"/>
		<const name="track_wl" value="1" descr="1 - автоматически рассчитывать средний коэф. и вероятность выигрыша, 0 - всегда брать начальные значения" saveValue="0"/>
		<const name="min_depth" value="15" descr="Мин. кол-во рассчитанных событий, после которых начать автоматический расчет" saveValue="0"/>
		<const name="max_deviation" value="50" descr="Макс. отклонение от среднего коэффициента, %" saveValue="0"/>
	</constants>
	<annotation/>
</mf-xml>