

 <mf-xml>
	<block ID="95304930461877824" Active="1" Name="Lay Pro 88 Staking Plan" Repeat="0.0" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>95304930461877824</BlockID>
				<Active>5</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95304930461877827</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>7</MarketStatus>
				<Name>initialising current_bet</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>unit_bet</Price>
					<Amount>unit_size*IF(test_mode=1, test_funds, total_funds)/100</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>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>current_bet</Price>
					<Amount>unit_bet</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>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>95304930461877824</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95304930461877829</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>6</MarketStatus>
				<Name>reducing the stake after a win</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>current_bet</Price>
					<Amount>IF(current_bet - unit_bet*win_reduction/100 &lt; unit_bet, unit_bet, current_bet - unit_bet*win_reduction/100)</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>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>
							<condition AndOr="1" Body="8" Param="76" CondIndex="3" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95304930461877824</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95304930461877828</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>6</MarketStatus>
				<Name>adding a unit after loss</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>current_bet</Price>
					<Amount>current_bet + unit_bet</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>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>
							<condition AndOr="1" Body="8" Param="76" CondIndex="2" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95304930461877824</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>96241459108300723</ID>
				<SelectionType>6</SelectionType>
				<HandicapID>0</HandicapID>
				<MarketStatus>6</MarketStatus>
				<Name>after the loss has been recovered</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>unit_bet</Price>
					<Amount>unit_size*IF(test_mode=1, test_funds, total_funds)/100</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>32</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>current_bet</Price>
					<Amount>unit_bet</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>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>
							<condition AndOr="1" Body="8" Param="76" CondIndex="3" Value2="" Value1="0" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="61" CondIndex="0" Value2="" Value1="unit_bet" TriggerID="0" SecondParam="current_bet" Overall="0" RereadFile="0" Order="2"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95304930461877824</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95304930461877826</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>
					<Action>1</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>lay_price</Price>
					<Amount>current_bet</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>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>
							<tblck AndOr="1" Order="7">
								<blcks/>
								<conds>
									<condition AndOr="0" Body="6" Param="70" CondIndex="0" Value2="" Value1="0" TriggerID="95304930461877826" SecondParam="" Overall="1" RereadFile="0" Order="1"/>
									<condition AndOr="0" Body="20" Param="53" CondIndex="18" Value2="" Value1="" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
									<condition AndOr="0" Body="20" Param="63" CondIndex="4" Value2="" Value1="-20" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
								</conds>
							</tblck>
						</blcks>
						<conds>
							<condition AndOr="1" Body="8" Param="53" CondIndex="34" Value2="" Value1="" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
							<condition AndOr="1" Body="1" Param="28" CondIndex="0" Value2="" Value1="fav_rank" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="2"/>
							<condition AndOr="1" Body="1" Param="1" CondIndex="6" Value2="max_odds" Value1="min_odds" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="3"/>
							<condition AndOr="1" Body="8" Param="48" CondIndex="5" Value2="" Value1="min_runners" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="4"/>
							<condition AndOr="1" Body="1" Param="1" CondIndex="5" Value2="" Value1="r_ticks(r_1_lay_price, min_price_dif)" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="5"/>
							<condition AndOr="1" Body="8" Param="63" CondIndex="4" Value2="" Value1="mins_before_off" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="6"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="unit_size" value="1" descr="Unit size, % of bank" saveValue="0"/>
		<const name="win_reduction" value="10" descr="How much to reduce the bet after a win, % of the bet" saveValue="0"/>
		<const name="min_runners" value="6" descr="Minimum number of runners" saveValue="0"/>
		<const name="mins_before_off" value="1" descr="When to place a bet, minutes before start" saveValue="0"/>
		<const name="fav_rank" value="1" descr="Rank of the favourite to lay on (1 - first fav., 2 - second fav. and so on)" saveValue="0"/>
		<const name="min_price_dif" value="20" descr="Minimum price difference between first fav. and the horse to lay on, in ticks" saveValue="0"/>
		<const name="min_odds" value="2.5" descr="Minimum odds to lay at" saveValue="0"/>
		<const name="max_odds" value="10.5" descr="Maximum odds to lay at" saveValue="0"/>
	</constants>
	<annotation/>
</mf-xml>