

 <mf-xml>
	<block ID="97185536018383345" Active="1" Name="Cross-Market Green-up" Repeat="0.0" RepeatTimes="0" Protected="0" Enabled="1" Expanded="1">
		<Triggers>
			<trigger>
				<BlockID>97185536018383345</BlockID>
				<Active>6</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>97189656802344159</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>initialising variables</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Version>1</Version>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>corr1</Price>
					<Amount>-1</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>3</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>
					<Comment>...</Comment>
				</ActionSet>
				<ActionSet>
					<Version>1</Version>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>corr2</Price>
					<Amount>-1</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>3</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>
					<Comment>...</Comment>
				</ActionSet>
				<conditions>
					<tblck AndOr="1" Order="0">
						<blcks/>
						<conds/>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>97185536018383345</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>97185536018383346</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>laying</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Version>1</Version>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>corr1</Price>
					<Amount>(lay_price-commission)</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>3</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>
					<Comment>...</Comment>
				</ActionSet>
				<ActionSet>
					<Version>1</Version>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>lpc</Price>
					<Amount>(lay_price - 1)/(1-commission) + 1</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>3</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>
					<Comment>...</Comment>
				</ActionSet>
				<ActionSet>
					<Version>1</Version>
					<Action>1</Action>
					<Persistence>1</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>lay_price</Price>
					<Amount>IF(back_then_lay=0, bet_liab/(lay_price - 1), football{back_mkt}_s_{back_sidx}_back_matched*corr2/corr1)</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>
					<Comment>...</Comment>
				</ActionSet>
				<conditions>
					<tblck AndOr="1" Order="0">
						<blcks>
							<tblck AndOr="1" Order="3">
								<blcks>
									<tblck AndOr="0" Order="1">
										<blcks/>
										<conds>
											<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="0" TriggerID="0" BetTriggerID="0" SecondParam="back_then_lay" Overall="0" RereadFile="0" Order="1"/>
											<condition AndOr="1" Body="8" Param="63" CondIndex="4" Value2="" Value1="mins_before_off" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="6" Value2="max_price_back" Value1="min_price_back" TriggerID="0" BetTriggerID="0" SecondParam="football{back_mkt}_s_back_sidx_back_price" Overall="0" RereadFile="0" Order="3"/>
											<condition AndOr="1" Body="1" Param="1" CondIndex="6" Value2="max_price_lay" Value1="min_price_lay" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
											<condition AndOr="1" Body="8" Param="49" CondIndex="5" Value2="" Value1="min_vlm" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="5"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="5" Value2="" Value1="min_vlm" TriggerID="0" BetTriggerID="0" SecondParam="football{back_mkt}_market_volume" Overall="0" RereadFile="0" Order="6"/>
										</conds>
									</tblck>
									<tblck AndOr="0" Order="2">
										<blcks/>
										<conds>
											<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="1" TriggerID="0" BetTriggerID="0" SecondParam="back_then_lay" Overall="0" RereadFile="0" Order="1"/>
											<condition AndOr="1" Body="6" Param="84" CondIndex="3" Value2="" Value1="0" TriggerID="97185536018383347" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="3" Value2="" Value1="0" TriggerID="0" BetTriggerID="0" SecondParam="football{back_mkt}_s_{back_sidx}_back_matched" Overall="0" RereadFile="0" Order="3"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="3" Value2="" Value1="((lay_price-1)/(1-commission) + 1)/(1-green_prc/100)" TriggerID="0" BetTriggerID="0" SecondParam="corr2" Overall="0" RereadFile="0" Order="4"/>
										</conds>
									</tblck>
								</blcks>
								<conds/>
							</tblck>
						</blcks>
						<conds>
							<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="football{lay_mkt}_market_code" TriggerID="0" BetTriggerID="0" SecondParam="market_code" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="37" CondIndex="0" Value2="" Value1="lay_sidx" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="1" Param="0" CondIndex="5" Value2="" Value1="r_ticks(lay_price, -max_gap)" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>97185536018383345</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>97185536018383347</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>backing</Name>
				<RepeatTimes>0</RepeatTimes>
				<Repeat>0.0</Repeat>
				<Enabled>1</Enabled>
				<Logged>1</Logged>
				<ActionSet>
					<Version>1</Version>
					<Action>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>corr2</Price>
					<Amount>(back_price-1)*(1-commission) + 1</Amount>
					<AdjustAmounts>0</AdjustAmounts>
					<WinLoseOption>0</WinLoseOption>
					<RemVariable>1</RemVariable>
					<GreenupType>1</GreenupType>
					<RemBets>0</RemBets>
					<UserVariable>3</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>
					<Comment>...</Comment>
				</ActionSet>
				<ActionSet>
					<Version>1</Version>
					<Action>0</Action>
					<Persistence>1</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>back_price</Price>
					<Amount>IF(back_then_lay=1, bet_liab, football{lay_mkt}_s_{lay_sidx}_lay_matched*corr1/corr2)</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>
					<Comment>...</Comment>
				</ActionSet>
				<conditions>
					<tblck AndOr="1" Order="0">
						<blcks>
							<tblck AndOr="1" Order="3">
								<blcks>
									<tblck AndOr="0" Order="1">
										<blcks/>
										<conds>
											<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="0" TriggerID="0" BetTriggerID="0" SecondParam="back_then_lay" Overall="0" RereadFile="0" Order="1"/>
											<condition AndOr="1" Body="6" Param="84" CondIndex="3" Value2="" Value1="0" TriggerID="97185536018383346" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="3" Value2="" Value1="0" TriggerID="0" BetTriggerID="0" SecondParam="football{lay_mkt}_s_{lay_sidx}_lay_matched" Overall="0" RereadFile="0" Order="3"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="2" Value2="" Value1="((back_price-1)*(1-commission) + 1)/(1+green_prc/100)" TriggerID="0" BetTriggerID="0" SecondParam="lpc" Overall="0" RereadFile="0" Order="4"/>
										</conds>
									</tblck>
									<tblck AndOr="0" Order="2">
										<blcks/>
										<conds>
											<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="1" TriggerID="0" BetTriggerID="0" SecondParam="back_then_lay" Overall="0" RereadFile="0" Order="1"/>
											<condition AndOr="1" Body="8" Param="63" CondIndex="4" Value2="" Value1="mins_before_off" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
											<condition AndOr="1" Body="1" Param="0" CondIndex="6" Value2="max_price_back" Value1="min_price_back" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="6" Value2="max_price_lay" Value1="min_price_lay" TriggerID="0" BetTriggerID="0" SecondParam="football{lay_mkt}_s_{lay_sidx}_lay_price" Overall="0" RereadFile="0" Order="4"/>
											<condition AndOr="1" Body="8" Param="49" CondIndex="5" Value2="" Value1="min_vlm" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="5"/>
											<condition AndOr="1" Body="1" Param="61" CondIndex="5" Value2="" Value1="min_vlm" TriggerID="0" BetTriggerID="0" SecondParam="football{lay_mkt}_market_volume" Overall="0" RereadFile="0" Order="6"/>
										</conds>
									</tblck>
								</blcks>
								<conds/>
							</tblck>
						</blcks>
						<conds>
							<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="football{back_mkt}_market_code" TriggerID="0" BetTriggerID="0" SecondParam="market_code" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="37" CondIndex="0" Value2="" Value1="back_sidx" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="1" Param="0" CondIndex="5" Value2="" Value1="r_ticks(lay_price, -max_gap)" TriggerID="0" BetTriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="bet_liab" value="50" descr="Liability of the first bet" saveValue="0"/>
		<const name="mins_before_off" value="2" descr="When to place bets, minutes before the off" saveValue="0"/>
		<const name="back_sidx" value="5" descr="Index of the selection to back on" saveValue="0"/>
		<const name="lay_sidx" value="3" descr="Index of the selection to lay on" saveValue="0"/>
		<const name="back_mkt" value="19" descr="Football prefix for the back bet. 1 - Match Odds, 2 - Correct Score; 6 - Over/Under 0.5 goals, etc. See Prefixes for Cross-Market Betting" saveValue="0"/>
		<const name="lay_mkt" value="1" descr="Football prefix for the lay bet. 1 - Match Odds, 2 - Correct Score; 6 - Over/Under 0.5 goals, etc. See Prefixes for Cross-Market Betting" saveValue="0"/>
		<const name="min_price_back" value="1.01" descr="Minimum price of the back bet" saveValue="0"/>
		<const name="min_price_lay" value="1.01" descr="Minimum price of the lay bet" saveValue="0"/>
		<const name="max_price_back" value="100" descr="Maximum price of the back bet" saveValue="0"/>
		<const name="max_price_lay" value="100" descr="Maximum price of the lay bet" saveValue="0"/>
		<const name="green_prc" value="7" descr="Minimum green-up profit percentage" saveValue="0"/>
		<const name="back_then_lay" value="0" descr="1 - first back, then lay; 0 - first lay, then back" saveValue="0"/>
		<const name="max_gap" value="10" descr="Maximum gap between the back and lay prices, ticks" saveValue="0"/>
		<const name="min_vlm" value="500" descr="Minimum matched volume in either of the markets" saveValue="0"/>
	</constants>
	<annotation/>
</mf-xml>