

 <mf-xml>
	<block ID="95997923900284612" Active="1" Name="Уравнивание прибыли по коэффициенту следующего фаворита" Repeat="0.0" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>95997923900284612</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>1</Market>
				<ID>95998319076483788</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>0</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>raceTime</Price>
					<Amount>IF(FIND(&quot;2m4f&quot;, &quot;market_name&quot;) &gt; 0, 324, IF(FIND(&quot;3m1f&quot;, &quot;market_name&quot;) &gt; 0, 381, IF(FIND(&quot;2m1f&quot;, &quot;market_name&quot;) &gt; 0, 258, IF(FIND(&quot;2m3f&quot;, &quot;market_name&quot;) &gt; 0, 282, IF(FIND(&quot;2m6f&quot;, &quot;market_name&quot;) &gt; 0, 355, IF(FIND(&quot;2m2f&quot;, &quot;market_name&quot;) &gt; 0, 263, IF(FIND(&quot;1m6f&quot;, &quot;market_name&quot;) &gt; 0, 212, IF(FIND(&quot;1m3f&quot;, &quot;market_name&quot;) &gt; 0, 135, IF(FIND(&quot;2m5f&quot;, &quot;market_name&quot;) &gt; 0, 326, IF(FIND(&quot;2m7f&quot;, &quot;market_name&quot;) &gt; 0, 354, IF(FIND(&quot;1m4f&quot;, &quot;market_name&quot;) &gt; 0, 142, IF(FIND(&quot;1m2f&quot;, &quot;market_name&quot;) &gt; 0, 125, IF(FIND(&quot;1m5f&quot;, &quot;market_name&quot;) &gt; 0, 189, IF(FIND(&quot;1m1f&quot;, &quot;market_name&quot;) &gt; 0, 102, IF(FIND(&quot;3m3f&quot;, &quot;market_name&quot;) &gt; 0, 419, IF(FIND(&quot;3m7f&quot;, &quot;market_name&quot;) &gt; 0, 389, IF(FIND(&quot;3m4f&quot;, &quot;market_name&quot;) &gt; 0, 467, IF(FIND(&quot;3m2f&quot;, &quot;market_name&quot;) &gt; 0, 393, IF(FIND(&quot;3m5f&quot;, &quot;market_name&quot;) &gt; 0, 476, IF(FIND(&quot;3m6f&quot;, &quot;market_name&quot;) &gt; 0, 450, IF(FIND(&quot;4m1f&quot;, &quot;market_name&quot;) &gt; 0, 523, IF(FIND(&quot;4m3f&quot;, &quot;market_name&quot;) &gt; 0, 520, IF(FIND(&quot;1m7f&quot;, &quot;market_name&quot;) &gt; 0, 228, IF(FIND(&quot;4m2f&quot;, &quot;market_name&quot;) &gt; 0, 546, IF(FIND(&quot;5f&quot;, &quot;market_name&quot;) &gt; 0, 55, IF(FIND(&quot;6f&quot;, &quot;market_name&quot;) &gt; 0, 61, IF(FIND(&quot;7f&quot;, &quot;market_name&quot;) &gt; 0, 79, IF(FIND(&quot;4m&quot;, &quot;market_name&quot;) &gt; 0, 497, IF(FIND(&quot;3m&quot;, &quot;market_name&quot;) &gt; 0, 360, IF(FIND(&quot;2m&quot;, &quot;market_name&quot;) &gt; 0, 228, IF(FIND(&quot;1m&quot;, &quot;market_name&quot;) &gt; 0, 91, 0)))))))))))))))))))))))))))))))</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>1</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<GreenupLastPrice>1</GreenupLastPrice>
					<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/>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95997923900284612</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95997923900284614</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>2</MarketStatus>
				<Name>ставка ПРОТИВ</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</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>first_bet_size</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>
					<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="28" CondIndex="6" Value2="max_rank" Value1="min_rank" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="8" Param="63" CondIndex="2" Value2="" Value1="mins_before_start" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="8" Param="53" CondIndex="34" Value2="" Value1="" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
							<condition AndOr="1" Body="1" Param="61" CondIndex="5" Value2="" Value1="min_dist" TriggerID="0" SecondParam="market_length" Overall="0" RereadFile="0" Order="4"/>
							<condition AndOr="1" Body="8" Param="48" CondIndex="3" Value2="" Value1="max_rank" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="5"/>
							<condition AndOr="1" Body="8" Param="48" CondIndex="5" Value2="" Value1="min_runners" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="6"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95997923900284612</BlockID>
				<Active>2</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95997923900284616</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>1</MarketStatus>
				<Name>отмена непарных ставок и стоп-лосс</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>6</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price/>
					<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>
					<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>13</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price/>
					<Amount>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>
					<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="6" Param="71" CondIndex="3" Value2="" Value1="0" TriggerID="95997923900284614" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="0" CondIndex="4" Value2="" Value1="bm_layp/(1 + sl_prc/100)" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="8" Param="64" CondIndex="5" Value2="" Value1="0.15" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
							<condition AndOr="1" Body="8" Param="64" CondIndex="5" Value2="" Value1="(raceTime-seconds_to_end)/60" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95997923900284612</BlockID>
				<Active>2</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95997923900284615</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>2</MarketStatus>
				<Name>ставка ЗА</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>0</Action>
					<Persistence>1</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>r_(sel_order+1)_lay_price</Price>
					<Amount>lay_payout/r_(sel_order+1)_lay_price</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>
					<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="6" Param="71" CondIndex="3" Value2="" Value1="0" TriggerID="95997923900284614" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="7" CondIndex="3" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="1" Param="28" CondIndex="2" Value2="" Value1="runner_number" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
							<condition AndOr="1" Body="8" Param="53" CondIndex="34" Value2="" Value1="0" TriggerID="95998039656914664" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="first_bet_size" value="5" descr="Размер ставки ЗА" saveValue="0"/>
		<const name="sl_prc" value="80" descr="Процент убытка для стоп-лосса" saveValue="0"/>
		<const name="mins_before_start" value="0.5" descr="Когда делать ставки (за сколько минут до начала)" saveValue="0"/>
		<const name="min_dist" value="1600" descr="Минимальная дистанция рынка в метрах" saveValue="0"/>
		<const name="min_rank" value="3" descr="Мин. ранг фаворита, на которого ставить" saveValue="0"/>
		<const name="max_rank" value="4" descr="Макс. ранг фаворита, против которого ставить" saveValue="0"/>
		<const name="seconds_to_end" value="40" descr="Когда применить стоп-лосс (за сколько секунд до окончания скачки)" saveValue="0"/>
		<const name="min_runners" value="7" descr="Мин. кол-во участников скачки" saveValue="0"/>
	</constants>
	<annotation/>
</mf-xml>