

 <mf-xml>
	<block ID="95780894598596256" Active="1" Name="Двухступенчатый датчинг (ЗА)" Repeat="0.0" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>95780894598596256</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95780928324413276</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>инициализация переменных</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>new_book</Price>
					<Amount>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>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/>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95780894598596256</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95780894598596257</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Датчинг, первый раунд</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>14</Action>
					<Persistence>0</Persistence>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price/>
					<Amount>stage1_target_profit</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="37" CondIndex="8" Value2="" Value1="stage1_idx1, stage1_idx2, stage1_idx3, stage1_idx4" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="8" Param="64" CondIndex="5" Value2="" Value1="stage1_mins" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95780894598596256</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95780928324413278</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Датчинг, вычисления для второго раунда</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>new_book</Price>
					<Amount>new_book + IF(back_matched=0, 100/back_price, 100/(1+(back_matched*(bm_backp-1)+((stage2_target_profit*100/(100-match_b_book)-back_payout)/back_price)*(back_price-1))/(((stage2_target_profit*100/(100-match_b_book)-back_payout)/back_price)+back_matched)))</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="37" CondIndex="8" Value2="" Value1="stage2_idx1, stage2_idx2, stage2_idx3, stage1_idx1, stage1_idx2, stage1_idx3, stage1_idx4" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="8" Param="64" CondIndex="5" Value2="" Value1="stage2_mins" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="0" Param="6" CondIndex="3" Value2="" Value1="0" TriggerID="95780928324413239" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
							<condition AndOr="1" Body="19" Param="8" CondIndex="0" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95780894598596256</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95780928324413213</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Датчинг, второй раунд</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>0</Action>
					<Persistence>0</Persistence>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>back_price</Price>
					<Amount>(stage2_target_profit*100/(100 - new_book) - back_payout)/back_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="95780928324413278" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="stage1_target_profit" value="100" descr="Желаемая прибыль после 1-го раунда датчинга" saveValue="0"/>
		<const name="stage2_target_profit" value="150" descr="Желаемая прибыль после 2-го раунда датчинга" saveValue="0"/>
		<const name="stage1_idx1" value="1" descr="Раунд 1, порядковый номер исхода 1" saveValue="0"/>
		<const name="stage1_idx2" value="2" descr="Раунд 1, порядковый номер исхода 2" saveValue="0"/>
		<const name="stage1_idx3" value="3" descr="Раунд 1, порядковый номер исхода 3" saveValue="0"/>
		<const name="stage1_idx4" value="4" descr="Раунд 1, порядковый номер исхода 4" saveValue="0"/>
		<const name="stage2_idx1" value="6" descr="Раунд 2, порядковый номер исхода 1" saveValue="0"/>
		<const name="stage2_idx2" value="7" descr="Раунд 2, порядковый номер исхода 2" saveValue="0"/>
		<const name="stage2_idx3" value="8" descr="Раунд 2, порядковый номер исхода 3" saveValue="0"/>
		<const name="stage1_mins" value="5" descr="Через сколько минут после начала сделать первый раунд датчинга" saveValue="0"/>
		<const name="stage2_mins" value="15" descr="Через сколько минут после начала сделать второй раунд датчинга" saveValue="0"/>
	</constants>
	<annotation/>
</mf-xml>