

 <?mf-xml version="1.0"?>
	<block ID="94599022095557395" Active="2" Name="Offset betting in Over/Under markets" Repeat="5" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>94599022095557395</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94599022095557402</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Close and repeat</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>18</Action>
					<Persistence>0</Persistence>
					<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>
					<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>94599022095557395</TriggerID>
				</ActionSet>
				<conditions>
					<tblck AndOr="1" Order="0">
						<blcks/>
						<conds>
							<condition AndOr="1" Body="6" Param="71" CondIndex="3" Value2="" Value1="0" TriggerID="94599022095557396" SecondParam="" Overall="0" Order="1"/>
							<condition AndOr="1" Body="8" Param="63" CondIndex="3" Value2="" Value1="mins_end" TriggerID="0" SecondParam="" Overall="0" Order="2"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>94599022095557395</BlockID>
				<Active>2</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94599022095557396</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Cancelling unmatched portions</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>8</Action>
					<Persistence>0</Persistence>
					<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>
					<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="0" Body="1" Param="33" CondIndex="3" Value2="" Value1="timestamp_bm_backnum" TriggerID="0" SecondParam="bm_backtime" Overall="0" Order="1"/>
							<condition AndOr="0" Body="1" Param="34" CondIndex="3" Value2="" Value1="timestamp_bm_laynum" TriggerID="0" SecondParam="bm_laytime" Overall="0" Order="2"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>94599022095557395</BlockID>
				<Active>2</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94599022095557391</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Back and Lay bets</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>r_ticks(back_price, tcks)</Price>
					<Amount>default_backa</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>
					<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>1</Action>
					<Persistence>0</Persistence>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>r_ticks(lay_price, -tcks)</Price>
					<Amount>default_laya</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>
					<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>22</Action>
					<Persistence>0</Persistence>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>timestamp</Price>
					<Amount>now_time</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>0</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>1</RemBets>
					<UserVariable>1</UserVariable>
					<UseOptions>0</UseOptions>
					<TrailingSL>0</TrailingSL>
					<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="8" CondIndex="0" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="9" CondIndex="0" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" Order="2"/>
							<condition AndOr="1" Body="8" Param="63" CondIndex="6" Value2="mins_start" Value1="mins_end" TriggerID="0" SecondParam="" Overall="0" Order="3"/>
							<condition AndOr="1" Body="8" Param="49" CondIndex="5" Value2="" Value1="min_vlm" TriggerID="0" SecondParam="" Overall="0" Order="4"/>
							<condition AndOr="1" Body="8" Param="47" CondIndex="24" Value2="" Value1="goal_number" TriggerID="0" SecondParam="" Overall="0" Order="5"/>
							<condition AndOr="1" Body="1" Param="0" CondIndex="5" Value2="" Value1="r_ticks(lay_price, -gap)" TriggerID="0" SecondParam="" Overall="0" Order="6"/>
							<condition AndOr="1" Body="1" Param="8" CondIndex="0" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" Order="7"/>
							<condition AndOr="1" Body="1" Param="9" CondIndex="0" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" Order="8"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<block ID="94599022095557390" Active="1" Name="Closing open positions" Repeat="0.0" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>94599022095557390</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>94599022095557394</ID>
				<SelectionType>4</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>Distributing profit and loss</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Action>8</Action>
					<Persistence>0</Persistence>
					<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>
					<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>
					<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>
					<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>11</Action>
					<Persistence>0</Persistence>
					<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>
					<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="8" Param="63" CondIndex="4" Value2="" Value1="mins_end" TriggerID="0" SecondParam="" Overall="0" Order="1"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="goal_number" value="2.5" descr="Number of goals in the market's name" saveValue="0"/>
		<const name="min_vlm" value="1000" descr="Minimum matched volume" saveValue="0"/>
		<const name="mins_start" value="120" descr="Minutes before the beginning of the match when the betting starts" saveValue="0"/>
		<const name="tcks" value="2" descr="Number of offset price ticks" saveValue="0"/>
		<const name="mins_end" value="5" descr="Minutes before the beginning of the match when the betting ends" saveValue="0"/>
		<const name="gap" value="3" descr="Maximum price gap in ticks" saveValue="0"/>
	</constants>
	<annotation/>
 