

 <mf-xml>
	<block ID="95920037722870102" Active="1" Name="Максимальная прибыль и убыток" Repeat="0.0" RepeatTimes="0" Protected="0" Enabled="1">
		<Triggers>
			<trigger>
				<BlockID>95920037722870102</BlockID>
				<Active>5</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95920037722870104</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>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>stop_profit</Price>
					<Amount>target_profit*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>stop_loss</Price>
					<Amount>max_loss*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>
				<conditions>
					<tblck AndOr="1" Order="0">
						<blcks/>
						<conds/>
					</tblck>
				</conditions>
			</trigger>
			<trigger>
				<BlockID>95920037722870102</BlockID>
				<Active>1</Active>
				<CondMet>0</CondMet>
				<Market>0</Market>
				<ID>95920037722870103</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>1</Action>
					<Persistence>0</Persistence>
					<Expires/>
					<AmountChange>0</AmountChange>
					<SettleType>2</SettleType>
					<Price>lay_price</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>
					<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="24" Param="66" CondIndex="6" Value2="stop_profit-0.05" Value1="-stop_loss+0.05" TriggerID="0" SecondParam="" Overall="0" RereadFile="0" Order="1"/>
						</conds>
					</tblck>
				</conditions>
			</trigger>
		</Triggers>
	</block>
	<constants>
		<const name="target_profit" value="30" descr="Максимальная (целевая) прибыль, в процентах от начального банка" saveValue="0"/>
		<const name="max_loss" value="50" descr="Максимальный убыток, в процентах от начального банка" saveValue="0"/>
	</constants>
	<annotation/>
</mf-xml>