Advertisement
Guest User

Untitled

a guest
May 25th, 2021
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 94.14 KB | None | 0 0
  1. #region Using declarations
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Xml.Serialization;
  13. using NinjaTrader.Cbi;
  14. using NinjaTrader.Gui;
  15. using NinjaTrader.Gui.Chart;
  16. using NinjaTrader.Gui.SuperDom;
  17. using NinjaTrader.Gui.Tools;
  18. using NinjaTrader.Data;
  19. using NinjaTrader.NinjaScript;
  20. using NinjaTrader.Core.FloatingPoint;
  21. using NinjaTrader.NinjaScript.Indicators;
  22. using NinjaTrader.NinjaScript.DrawingTools;
  23. #endregion
  24.  
  25. //This namespace holds Strategies in this folder and is required. Do not change it.
  26. namespace NinjaTrader.NinjaScript.Strategies
  27. {
  28.     public class MultiStepBreakeven : Strategy
  29.     {
  30.         private int StopLossMode;
  31.  
  32.  
  33.         protected override void OnStateChange()
  34.         {
  35.             if (State == State.SetDefaults)
  36.             {
  37.                 Description                                 = @"Enter the description for your new custom Strategy here.";
  38.                 Name                                        = "MultiStepBreakeven";
  39.                 Calculate                                   = Calculate.OnBarClose;
  40.                 EntriesPerDirection                         = 1;
  41.                 EntryHandling                               = EntryHandling.AllEntries;
  42.                 IsExitOnSessionCloseStrategy                = true;
  43.                 ExitOnSessionCloseSeconds                   = 30;
  44.                 IsFillLimitOnTouch                          = false;
  45.                 MaximumBarsLookBack                         = MaximumBarsLookBack.TwoHundredFiftySix;
  46.                 OrderFillResolution                         = OrderFillResolution.Standard;
  47.                 Slippage                                    = 0;
  48.                 StartBehavior                               = StartBehavior.WaitUntilFlat;
  49.                 TimeInForce                                 = TimeInForce.Gtc;
  50.                 TraceOrders                                 = false;
  51.                 RealtimeErrorHandling                       = RealtimeErrorHandling.StopCancelClose;
  52.                 StopTargetHandling                          = StopTargetHandling.PerEntryExecution;
  53.                 BarsRequiredToTrade                         = 20;
  54.                 // Disable this property for performance gains in Strategy Analyzer optimizations
  55.                 // See the Help Guide for additional information
  56.                 IsInstantiatedOnEachOptimizationIteration   = true;
  57.                 StopLossMode                    = 0;
  58.             }
  59.             else if (State == State.Configure)
  60.             {
  61.             }
  62.         }
  63.  
  64.         protected override void OnBarUpdate()
  65.         {
  66.             if (BarsInProgress != 0)
  67.                 return;
  68.  
  69.             if (CurrentBars[0] < 2)
  70.                 return;
  71.  
  72.              //LONG ORDERS
  73.              // Set 1
  74.             if ((Position.MarketPosition == MarketPosition.Flat)
  75.                  && (High[0] > High[1])
  76.                  && (High[1] > High[2])
  77.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0))
  78.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0)))
  79.             {
  80.                 EnterLongLimit(Convert.ToInt32(DefaultQuantity), 0, "");
  81.                 StopLossMode = 0;              
  82.             }
  83.            
  84.              // Set 2
  85.             if ((Position.MarketPosition == MarketPosition.Long)
  86.                  && (StopLossMode == 0)
  87.                  && (High[1] > High[2])
  88.                  && (High[0] > High[1])
  89.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  90.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  91.             {
  92.                 ExitLongStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (-10 * TickSize)) , "", "");
  93.             }
  94.  
  95.              // Set 3
  96.             if ((Position.MarketPosition == MarketPosition.Long)
  97.                  && (StopLossMode == 1)
  98.                  && (High[1] > High[2])
  99.                  && (High[0] > High[1])
  100.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  101.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  102.             {
  103.                 ExitLongStopMarket(Convert.ToInt32(DefaultQuantity), Position.AveragePrice, "", "");
  104.             }
  105.  
  106.              // Set 4
  107.             if ((Position.MarketPosition == MarketPosition.Long)
  108.                  && (StopLossMode == 2)
  109.                  && (High[1] > High[2])
  110.                  && (High[0] > High[1])
  111.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  112.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  113.             {
  114.                 ExitLongStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (10 * TickSize)) , "", "");
  115.             }
  116.  
  117.  
  118.              // Set 5
  119.             if ((Position.MarketPosition == MarketPosition.Long)
  120.                  && (StopLossMode == 0)
  121.                  && (Close[0] >= (Position.AveragePrice + (10 * TickSize)) )
  122.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  123.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  124.             {
  125.                 StopLossMode = 1;
  126.             }
  127.  
  128.  
  129.              // Set 6
  130.             if ((Position.MarketPosition == MarketPosition.Long)
  131.                  && (StopLossMode == 1)
  132.                  && (Close[0] >= (Position.AveragePrice + (20 * TickSize)) )
  133.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  134.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  135.             {
  136.                 StopLossMode = 2;
  137.             }
  138.  
  139.  
  140.              //SHORT ORDERS
  141.              // Set 7
  142.             if ((Position.MarketPosition == MarketPosition.Flat)
  143.                  && (Low[0] < Low[1])
  144.                  && (Low[1] < Low[2])
  145.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0))
  146.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0)))
  147.             {
  148.                 EnterShortLimit(Convert.ToInt32(DefaultQuantity), 0, "");
  149.                 StopLossMode = 0;              
  150.             }
  151.            
  152.              // Set 8
  153.             if ((Position.MarketPosition == MarketPosition.Short)
  154.                  && (StopLossMode == 0)
  155.                  && (Low[0] < Low[1])
  156.                  && (Low[1] < Low[2])
  157.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  158.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  159.             {
  160.                 ExitShortStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (10 * TickSize)) , "", "");
  161.             }
  162.  
  163.              // Set 9
  164.             if ((Position.MarketPosition == MarketPosition.Short)
  165.                  && (StopLossMode == 1)
  166.                  && (Low[0] < Low[1])
  167.                  && (Low[1] < Low[2])
  168.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  169.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  170.             {
  171.                 ExitShortStopMarket(Convert.ToInt32(DefaultQuantity), Position.AveragePrice, "", "");
  172.             }
  173.  
  174.              // Set 10
  175.             if ((Position.MarketPosition == MarketPosition.Short)
  176.                  && (StopLossMode == 2)
  177.                  && (Low[0] < Low[1])
  178.                  && (Low[1] < Low[2])
  179.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  180.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  181.             {
  182.                 ExitShortStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (-10 * TickSize)) , "", "");
  183.             }
  184.  
  185.  
  186.              // Set 11
  187.             if ((Position.MarketPosition == MarketPosition.Short)
  188.                  && (StopLossMode == 0)
  189.                  && (Close[0] >= (Position.AveragePrice + (-10 * TickSize)) )
  190.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  191.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  192.             {
  193.                 StopLossMode = 1;
  194.             }
  195.  
  196.  
  197.              // Set 12
  198.             if ((Position.MarketPosition == MarketPosition.Short)
  199.                  && (StopLossMode == 1)
  200.                  && (Close[0] >= (Position.AveragePrice + (-20 * TickSize)) )
  201.                  && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
  202.                  && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
  203.             {
  204.                 StopLossMode = 2;
  205.             }
  206.            
  207.         }
  208.     }
  209. }
  210.  
  211. #region Wizard settings, neither change nor remove
  212. /*@
  213. <?xml version="1.0"?>
  214. <ScriptProperties xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  215.   <Calculate>OnBarClose</Calculate>
  216.   <ConditionalActions>
  217.     <ConditionalAction>
  218.       <Actions>
  219.         <WizardAction>
  220.           <Children />
  221.           <IsExpanded>false</IsExpanded>
  222.           <IsSelected>true</IsSelected>
  223.           <Name>Enter long position</Name>
  224.           <OffsetType>Arithmetic</OffsetType>
  225.           <ActionProperties>
  226.             <DashStyle>Solid</DashStyle>
  227.             <DivideTimePrice>false</DivideTimePrice>
  228.             <Id />
  229.             <File />
  230.             <IsAutoScale>false</IsAutoScale>
  231.             <IsSimulatedStop>false</IsSimulatedStop>
  232.             <IsStop>false</IsStop>
  233.             <LogLevel>Information</LogLevel>
  234.             <Mode>Currency</Mode>
  235.             <OffsetType>Currency</OffsetType>
  236.             <Priority>Medium</Priority>
  237.             <Quantity>
  238.               <DefaultValue>0</DefaultValue>
  239.               <IsInt>true</IsInt>
  240.               <DynamicValue>
  241.                 <Children />
  242.                 <IsExpanded>false</IsExpanded>
  243.                 <IsSelected>false</IsSelected>
  244.                 <Name>Default order quantity</Name>
  245.                 <OffsetType>Arithmetic</OffsetType>
  246.                 <AssignedCommand>
  247.                   <Command>DefaultQuantity</Command>
  248.                   <Parameters />
  249.                 </AssignedCommand>
  250.                 <BarsAgo>0</BarsAgo>
  251.                 <CurrencyType>Currency</CurrencyType>
  252.                 <Date>2019-06-13T07:13:53.354334</Date>
  253.                 <DayOfWeek>Sunday</DayOfWeek>
  254.                 <EndBar>0</EndBar>
  255.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  256.                 <LookBackPeriod>0</LookBackPeriod>
  257.                 <MarketPosition>Long</MarketPosition>
  258.                 <Period>0</Period>
  259.                 <ReturnType>Number</ReturnType>
  260.                 <StartBar>0</StartBar>
  261.                 <State>Undefined</State>
  262.                 <Time>0001-01-01T00:00:00</Time>
  263.               </DynamicValue>
  264.               <IsLiteral>false</IsLiteral>
  265.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  266.             </Quantity>
  267.             <ServiceName />
  268.             <ScreenshotPath />
  269.             <SoundLocation />
  270.             <Tag>
  271.               <SeparatorCharacter> </SeparatorCharacter>
  272.               <Strings>
  273.                 <NinjaScriptString>
  274.                   <Index>0</Index>
  275.                   <StringValue>Set Enter long position</StringValue>
  276.                 </NinjaScriptString>
  277.               </Strings>
  278.             </Tag>
  279.             <TextPosition>BottomLeft</TextPosition>
  280.             <VariableDateTime>2019-06-13T07:13:53.354334</VariableDateTime>
  281.             <VariableBool>false</VariableBool>
  282.           </ActionProperties>
  283.           <ActionType>Enter</ActionType>
  284.           <Command>
  285.             <Command>EnterLong</Command>
  286.             <Parameters>
  287.               <string>quantity</string>
  288.               <string>signalName</string>
  289.             </Parameters>
  290.           </Command>
  291.         </WizardAction>
  292.         <WizardAction>
  293.           <Children />
  294.           <IsExpanded>true</IsExpanded>
  295.           <IsSelected>true</IsSelected>
  296.           <Name>Set StopLossMode</Name>
  297.           <OffsetType>Arithmetic</OffsetType>
  298.           <ActionProperties>
  299.             <DashStyle>Solid</DashStyle>
  300.             <DivideTimePrice>false</DivideTimePrice>
  301.             <Id />
  302.             <File />
  303.             <IsAutoScale>false</IsAutoScale>
  304.             <IsSimulatedStop>false</IsSimulatedStop>
  305.             <IsStop>false</IsStop>
  306.             <LogLevel>Information</LogLevel>
  307.             <Mode>Currency</Mode>
  308.             <OffsetType>Currency</OffsetType>
  309.             <Priority>Medium</Priority>
  310.             <Quantity>
  311.               <DefaultValue>0</DefaultValue>
  312.               <IsInt>true</IsInt>
  313.               <DynamicValue>
  314.                 <Children />
  315.                 <IsExpanded>false</IsExpanded>
  316.                 <IsSelected>false</IsSelected>
  317.                 <Name>Default order quantity</Name>
  318.                 <OffsetType>Arithmetic</OffsetType>
  319.                 <AssignedCommand>
  320.                   <Command>DefaultQuantity</Command>
  321.                   <Parameters />
  322.                 </AssignedCommand>
  323.                 <BarsAgo>0</BarsAgo>
  324.                 <CurrencyType>Currency</CurrencyType>
  325.                 <Date>2019-10-14T14:31:29.3557158</Date>
  326.                 <DayOfWeek>Sunday</DayOfWeek>
  327.                 <EndBar>0</EndBar>
  328.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  329.                 <LookBackPeriod>0</LookBackPeriod>
  330.                 <MarketPosition>Long</MarketPosition>
  331.                 <Period>0</Period>
  332.                 <ReturnType>Number</ReturnType>
  333.                 <StartBar>0</StartBar>
  334.                 <State>Undefined</State>
  335.                 <Time>0001-01-01T00:00:00</Time>
  336.               </DynamicValue>
  337.               <IsLiteral>false</IsLiteral>
  338.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  339.             </Quantity>
  340.             <ServiceName />
  341.             <ScreenshotPath />
  342.             <SoundLocation />
  343.             <TextPosition>BottomLeft</TextPosition>
  344.             <VariableDateTime>2019-10-14T14:31:29.3557158</VariableDateTime>
  345.             <VariableBool>false</VariableBool>
  346.           </ActionProperties>
  347.           <ActionType>SetValue</ActionType>
  348.           <UserVariableType>int</UserVariableType>
  349.           <VariableName>StopLossMode</VariableName>
  350.         </WizardAction>
  351.       </Actions>
  352.       <ActiveAction>
  353.         <Children />
  354.         <IsExpanded>true</IsExpanded>
  355.         <IsSelected>true</IsSelected>
  356.         <Name>Set StopLossMode</Name>
  357.         <OffsetType>Arithmetic</OffsetType>
  358.         <ActionProperties>
  359.           <DashStyle>Solid</DashStyle>
  360.           <DivideTimePrice>false</DivideTimePrice>
  361.           <Id />
  362.           <File />
  363.           <IsAutoScale>false</IsAutoScale>
  364.           <IsSimulatedStop>false</IsSimulatedStop>
  365.           <IsStop>false</IsStop>
  366.           <LogLevel>Information</LogLevel>
  367.           <Mode>Currency</Mode>
  368.           <OffsetType>Currency</OffsetType>
  369.           <Priority>Medium</Priority>
  370.           <Quantity>
  371.             <DefaultValue>0</DefaultValue>
  372.             <IsInt>true</IsInt>
  373.             <DynamicValue>
  374.               <Children />
  375.               <IsExpanded>false</IsExpanded>
  376.               <IsSelected>false</IsSelected>
  377.               <Name>Default order quantity</Name>
  378.               <OffsetType>Arithmetic</OffsetType>
  379.               <AssignedCommand>
  380.                 <Command>DefaultQuantity</Command>
  381.                 <Parameters />
  382.               </AssignedCommand>
  383.               <BarsAgo>0</BarsAgo>
  384.               <CurrencyType>Currency</CurrencyType>
  385.               <Date>2019-10-14T14:31:29.3557158</Date>
  386.               <DayOfWeek>Sunday</DayOfWeek>
  387.               <EndBar>0</EndBar>
  388.               <ForceSeriesIndex>false</ForceSeriesIndex>
  389.               <LookBackPeriod>0</LookBackPeriod>
  390.               <MarketPosition>Long</MarketPosition>
  391.               <Period>0</Period>
  392.               <ReturnType>Number</ReturnType>
  393.               <StartBar>0</StartBar>
  394.               <State>Undefined</State>
  395.               <Time>0001-01-01T00:00:00</Time>
  396.             </DynamicValue>
  397.             <IsLiteral>false</IsLiteral>
  398.             <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  399.           </Quantity>
  400.           <ServiceName />
  401.           <ScreenshotPath />
  402.           <SoundLocation />
  403.           <TextPosition>BottomLeft</TextPosition>
  404.           <VariableDateTime>2019-10-14T14:31:29.3557158</VariableDateTime>
  405.           <VariableBool>false</VariableBool>
  406.         </ActionProperties>
  407.         <ActionType>SetValue</ActionType>
  408.         <UserVariableType>int</UserVariableType>
  409.         <VariableName>StopLossMode</VariableName>
  410.       </ActiveAction>
  411.       <AnyOrAll>All</AnyOrAll>
  412.       <Conditions>
  413.         <WizardConditionGroup>
  414.           <AnyOrAll>Any</AnyOrAll>
  415.           <Conditions>
  416.             <WizardCondition>
  417.               <LeftItem xsi:type="WizardConditionItem">
  418.                 <Children />
  419.                 <IsExpanded>false</IsExpanded>
  420.                 <IsSelected>true</IsSelected>
  421.                 <Name>Current market position</Name>
  422.                 <OffsetType>Arithmetic</OffsetType>
  423.                 <AssignedCommand>
  424.                   <Command>Position.MarketPosition</Command>
  425.                   <Parameters />
  426.                 </AssignedCommand>
  427.                 <BarsAgo>0</BarsAgo>
  428.                 <CurrencyType>Currency</CurrencyType>
  429.                 <Date>2019-06-13T07:13:17.5006667</Date>
  430.                 <DayOfWeek>Sunday</DayOfWeek>
  431.                 <EndBar>0</EndBar>
  432.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  433.                 <LookBackPeriod>0</LookBackPeriod>
  434.                 <MarketPosition>Long</MarketPosition>
  435.                 <Period>0</Period>
  436.                 <ReturnType>MarketData</ReturnType>
  437.                 <StartBar>0</StartBar>
  438.                 <State>Undefined</State>
  439.                 <Time>0001-01-01T00:00:00</Time>
  440.               </LeftItem>
  441.               <Lookback>1</Lookback>
  442.               <Operator>Equals</Operator>
  443.               <RightItem xsi:type="WizardConditionItem">
  444.                 <Children />
  445.                 <IsExpanded>false</IsExpanded>
  446.                 <IsSelected>true</IsSelected>
  447.                 <Name>Market position</Name>
  448.                 <OffsetType>Arithmetic</OffsetType>
  449.                 <AssignedCommand>
  450.                   <Command>MarketPosition.{0}</Command>
  451.                   <Parameters>
  452.                     <string>MarketPosition</string>
  453.                   </Parameters>
  454.                 </AssignedCommand>
  455.                 <BarsAgo>0</BarsAgo>
  456.                 <CurrencyType>Currency</CurrencyType>
  457.                 <Date>2019-06-13T07:13:17.5116603</Date>
  458.                 <DayOfWeek>Sunday</DayOfWeek>
  459.                 <EndBar>0</EndBar>
  460.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  461.                 <LookBackPeriod>0</LookBackPeriod>
  462.                 <MarketPosition>Flat</MarketPosition>
  463.                 <Period>0</Period>
  464.                 <ReturnType>MarketData</ReturnType>
  465.                 <StartBar>0</StartBar>
  466.                 <State>Undefined</State>
  467.                 <Time>0001-01-01T00:00:00</Time>
  468.               </RightItem>
  469.             </WizardCondition>
  470.           </Conditions>
  471.           <IsGroup>false</IsGroup>
  472.           <DisplayName>Position.MarketPosition = MarketPosition.Flat</DisplayName>
  473.         </WizardConditionGroup>
  474.         <WizardConditionGroup>
  475.           <AnyOrAll>Any</AnyOrAll>
  476.           <Conditions>
  477.             <WizardCondition>
  478.               <LeftItem xsi:type="WizardConditionItem">
  479.                 <Children />
  480.                 <IsExpanded>false</IsExpanded>
  481.                 <IsSelected>true</IsSelected>
  482.                 <Name>Close</Name>
  483.                 <OffsetType>Arithmetic</OffsetType>
  484.                 <AssignedCommand>
  485.                   <Command>{0}</Command>
  486.                   <Parameters>
  487.                     <string>Series1</string>
  488.                     <string>BarsAgo</string>
  489.                     <string>OffsetBuilder</string>
  490.                   </Parameters>
  491.                 </AssignedCommand>
  492.                 <BarsAgo>0</BarsAgo>
  493.                 <CurrencyType>Currency</CurrencyType>
  494.                 <Date>2019-06-13T07:13:41.4822233</Date>
  495.                 <DayOfWeek>Sunday</DayOfWeek>
  496.                 <EndBar>0</EndBar>
  497.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  498.                 <LookBackPeriod>0</LookBackPeriod>
  499.                 <MarketPosition>Long</MarketPosition>
  500.                 <Period>0</Period>
  501.                 <ReturnType>Series</ReturnType>
  502.                 <StartBar>0</StartBar>
  503.                 <State>Undefined</State>
  504.                 <Time>0001-01-01T00:00:00</Time>
  505.               </LeftItem>
  506.               <Lookback>1</Lookback>
  507.               <Operator>Greater</Operator>
  508.               <RightItem xsi:type="WizardConditionItem">
  509.                 <Children />
  510.                 <IsExpanded>false</IsExpanded>
  511.                 <IsSelected>true</IsSelected>
  512.                 <Name>Open</Name>
  513.                 <OffsetType>Arithmetic</OffsetType>
  514.                 <AssignedCommand>
  515.                   <Command>{0}</Command>
  516.                   <Parameters>
  517.                     <string>Series1</string>
  518.                     <string>BarsAgo</string>
  519.                     <string>OffsetBuilder</string>
  520.                   </Parameters>
  521.                 </AssignedCommand>
  522.                 <BarsAgo>0</BarsAgo>
  523.                 <CurrencyType>Currency</CurrencyType>
  524.                 <Date>2019-06-13T07:13:41.487219</Date>
  525.                 <DayOfWeek>Sunday</DayOfWeek>
  526.                 <EndBar>0</EndBar>
  527.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  528.                 <LookBackPeriod>0</LookBackPeriod>
  529.                 <MarketPosition>Long</MarketPosition>
  530.                 <Period>0</Period>
  531.                 <ReturnType>Series</ReturnType>
  532.                 <Series1>
  533.                   <AcceptableSeries>DataSeries DefaultSeries</AcceptableSeries>
  534.                   <CustomProperties />
  535.                   <IsExplicitlyNamed>false</IsExplicitlyNamed>
  536.                   <IsPriceTypeLocked>true</IsPriceTypeLocked>
  537.                   <PlotOnChart>false</PlotOnChart>
  538.                   <PriceType>Open</PriceType>
  539.                   <SeriesType>DefaultSeries</SeriesType>
  540.                 </Series1>
  541.                 <StartBar>0</StartBar>
  542.                 <State>Undefined</State>
  543.                 <Time>0001-01-01T00:00:00</Time>
  544.               </RightItem>
  545.             </WizardCondition>
  546.           </Conditions>
  547.           <IsGroup>false</IsGroup>
  548.           <DisplayName>Default input[0] &gt; Open[0]</DisplayName>
  549.         </WizardConditionGroup>
  550.       </Conditions>
  551.       <SetName>Set 1</SetName>
  552.       <SetNumber>1</SetNumber>
  553.     </ConditionalAction>
  554.     <ConditionalAction>
  555.       <Actions>
  556.         <WizardAction>
  557.           <Children />
  558.           <IsExpanded>false</IsExpanded>
  559.           <IsSelected>true</IsSelected>
  560.           <Name>Exit long position by a stop order</Name>
  561.           <OffsetType>Arithmetic</OffsetType>
  562.           <ActionProperties>
  563.             <DashStyle>Solid</DashStyle>
  564.             <DivideTimePrice>false</DivideTimePrice>
  565.             <Id />
  566.             <File />
  567.             <IsAutoScale>false</IsAutoScale>
  568.             <IsSimulatedStop>false</IsSimulatedStop>
  569.             <IsStop>false</IsStop>
  570.             <LogLevel>Information</LogLevel>
  571.             <Mode>Currency</Mode>
  572.             <OffsetType>Currency</OffsetType>
  573.             <Priority>Medium</Priority>
  574.             <Quantity>
  575.               <DefaultValue>0</DefaultValue>
  576.               <IsInt>true</IsInt>
  577.               <DynamicValue>
  578.                 <Children />
  579.                 <IsExpanded>false</IsExpanded>
  580.                 <IsSelected>false</IsSelected>
  581.                 <Name>Default order quantity</Name>
  582.                 <OffsetType>Arithmetic</OffsetType>
  583.                 <AssignedCommand>
  584.                   <Command>DefaultQuantity</Command>
  585.                   <Parameters />
  586.                 </AssignedCommand>
  587.                 <BarsAgo>0</BarsAgo>
  588.                 <CurrencyType>Currency</CurrencyType>
  589.                 <Date>2019-10-14T14:39:33.0875786</Date>
  590.                 <DayOfWeek>Sunday</DayOfWeek>
  591.                 <EndBar>0</EndBar>
  592.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  593.                 <LookBackPeriod>0</LookBackPeriod>
  594.                 <MarketPosition>Long</MarketPosition>
  595.                 <Period>0</Period>
  596.                 <ReturnType>Number</ReturnType>
  597.                 <StartBar>0</StartBar>
  598.                 <State>Undefined</State>
  599.                 <Time>0001-01-01T00:00:00</Time>
  600.               </DynamicValue>
  601.               <IsLiteral>false</IsLiteral>
  602.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  603.             </Quantity>
  604.             <ServiceName />
  605.             <ScreenshotPath />
  606.             <SoundLocation />
  607.             <StopPrice>
  608.               <DefaultValue>0</DefaultValue>
  609.               <IsInt>false</IsInt>
  610.               <DynamicValue>
  611.                 <Children />
  612.                 <IsExpanded>false</IsExpanded>
  613.                 <IsSelected>true</IsSelected>
  614.                 <Name>Average position price</Name>
  615.                 <OffsetType>Arithmetic</OffsetType>
  616.                 <AssignedCommand>
  617.                   <Command>Position.AveragePrice</Command>
  618.                   <Parameters>
  619.                     <string>OffsetBuilder</string>
  620.                   </Parameters>
  621.                 </AssignedCommand>
  622.                 <BarsAgo>0</BarsAgo>
  623.                 <CurrencyType>Currency</CurrencyType>
  624.                 <Date>2019-10-14T14:39:41.5932176</Date>
  625.                 <DayOfWeek>Sunday</DayOfWeek>
  626.                 <EndBar>0</EndBar>
  627.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  628.                 <LookBackPeriod>0</LookBackPeriod>
  629.                 <MarketPosition>Long</MarketPosition>
  630.                 <OffsetBuilder>
  631.                   <ConditionOffset>
  632.                     <IsSetEnabled>false</IsSetEnabled>
  633.                     <OffsetValue>0</OffsetValue>
  634.                     <OffsetOperator>Add</OffsetOperator>
  635.                     <OffsetType>Ticks</OffsetType>
  636.                   </ConditionOffset>
  637.                   <Offset>
  638.                     <DefaultValue>0</DefaultValue>
  639.                     <IsInt>false</IsInt>
  640.                     <IsLiteral>true</IsLiteral>
  641.                     <LiveValue xsi:type="xsd:string">-10</LiveValue>
  642.                   </Offset>
  643.                 </OffsetBuilder>
  644.                 <Period>0</Period>
  645.                 <ReturnType>Number</ReturnType>
  646.                 <StartBar>0</StartBar>
  647.                 <State>Undefined</State>
  648.                 <Time>0001-01-01T00:00:00</Time>
  649.               </DynamicValue>
  650.               <IsLiteral>false</IsLiteral>
  651.               <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (-10 * TickSize)) </LiveValue>
  652.             </StopPrice>
  653.             <Tag>
  654.               <SeparatorCharacter> </SeparatorCharacter>
  655.               <Strings>
  656.                 <NinjaScriptString>
  657.                   <Index>0</Index>
  658.                   <StringValue>Set Exit long position by a stop order</StringValue>
  659.                 </NinjaScriptString>
  660.               </Strings>
  661.             </Tag>
  662.             <TextPosition>BottomLeft</TextPosition>
  663.             <VariableDateTime>2019-10-14T14:39:33.0875786</VariableDateTime>
  664.             <VariableBool>false</VariableBool>
  665.           </ActionProperties>
  666.           <ActionType>ExitStop</ActionType>
  667.           <Command>
  668.             <Command>ExitLongStopMarket</Command>
  669.             <Parameters>
  670.               <string>quantity</string>
  671.               <string>stopPrice</string>
  672.               <string>signalName</string>
  673.               <string>fromEntrySignal</string>
  674.             </Parameters>
  675.           </Command>
  676.         </WizardAction>
  677.       </Actions>
  678.       <ActiveAction>
  679.         <Children />
  680.         <IsExpanded>false</IsExpanded>
  681.         <IsSelected>true</IsSelected>
  682.         <Name>Exit long position by a stop order</Name>
  683.         <OffsetType>Arithmetic</OffsetType>
  684.         <ActionProperties>
  685.           <DashStyle>Solid</DashStyle>
  686.           <DivideTimePrice>false</DivideTimePrice>
  687.           <Id />
  688.           <File />
  689.           <IsAutoScale>false</IsAutoScale>
  690.           <IsSimulatedStop>false</IsSimulatedStop>
  691.           <IsStop>false</IsStop>
  692.           <LogLevel>Information</LogLevel>
  693.           <Mode>Currency</Mode>
  694.           <OffsetType>Currency</OffsetType>
  695.           <Priority>Medium</Priority>
  696.           <Quantity>
  697.             <DefaultValue>0</DefaultValue>
  698.             <IsInt>true</IsInt>
  699.             <DynamicValue>
  700.               <Children />
  701.               <IsExpanded>false</IsExpanded>
  702.               <IsSelected>false</IsSelected>
  703.               <Name>Default order quantity</Name>
  704.               <OffsetType>Arithmetic</OffsetType>
  705.               <AssignedCommand>
  706.                 <Command>DefaultQuantity</Command>
  707.                 <Parameters />
  708.               </AssignedCommand>
  709.               <BarsAgo>0</BarsAgo>
  710.               <CurrencyType>Currency</CurrencyType>
  711.               <Date>2019-10-14T14:39:33.0875786</Date>
  712.               <DayOfWeek>Sunday</DayOfWeek>
  713.               <EndBar>0</EndBar>
  714.               <ForceSeriesIndex>false</ForceSeriesIndex>
  715.               <LookBackPeriod>0</LookBackPeriod>
  716.               <MarketPosition>Long</MarketPosition>
  717.               <Period>0</Period>
  718.               <ReturnType>Number</ReturnType>
  719.               <StartBar>0</StartBar>
  720.               <State>Undefined</State>
  721.               <Time>0001-01-01T00:00:00</Time>
  722.             </DynamicValue>
  723.             <IsLiteral>false</IsLiteral>
  724.             <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  725.           </Quantity>
  726.           <ServiceName />
  727.           <ScreenshotPath />
  728.           <SoundLocation />
  729.           <StopPrice>
  730.             <DefaultValue>0</DefaultValue>
  731.             <IsInt>false</IsInt>
  732.             <DynamicValue>
  733.               <Children />
  734.               <IsExpanded>false</IsExpanded>
  735.               <IsSelected>true</IsSelected>
  736.               <Name>Average position price</Name>
  737.               <OffsetType>Arithmetic</OffsetType>
  738.               <AssignedCommand>
  739.                 <Command>Position.AveragePrice</Command>
  740.                 <Parameters>
  741.                   <string>OffsetBuilder</string>
  742.                 </Parameters>
  743.               </AssignedCommand>
  744.               <BarsAgo>0</BarsAgo>
  745.               <CurrencyType>Currency</CurrencyType>
  746.               <Date>2019-10-14T14:39:41.5932176</Date>
  747.               <DayOfWeek>Sunday</DayOfWeek>
  748.               <EndBar>0</EndBar>
  749.               <ForceSeriesIndex>false</ForceSeriesIndex>
  750.               <LookBackPeriod>0</LookBackPeriod>
  751.               <MarketPosition>Long</MarketPosition>
  752.               <OffsetBuilder>
  753.                 <ConditionOffset>
  754.                   <IsSetEnabled>false</IsSetEnabled>
  755.                   <OffsetValue>0</OffsetValue>
  756.                   <OffsetOperator>Add</OffsetOperator>
  757.                   <OffsetType>Ticks</OffsetType>
  758.                 </ConditionOffset>
  759.                 <Offset>
  760.                   <DefaultValue>0</DefaultValue>
  761.                   <IsInt>false</IsInt>
  762.                   <IsLiteral>true</IsLiteral>
  763.                   <LiveValue xsi:type="xsd:string">-10</LiveValue>
  764.                 </Offset>
  765.               </OffsetBuilder>
  766.               <Period>0</Period>
  767.               <ReturnType>Number</ReturnType>
  768.               <StartBar>0</StartBar>
  769.               <State>Undefined</State>
  770.               <Time>0001-01-01T00:00:00</Time>
  771.             </DynamicValue>
  772.             <IsLiteral>false</IsLiteral>
  773.             <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (-10 * TickSize)) </LiveValue>
  774.           </StopPrice>
  775.           <Tag>
  776.             <SeparatorCharacter> </SeparatorCharacter>
  777.             <Strings>
  778.               <NinjaScriptString>
  779.                 <Index>0</Index>
  780.                 <StringValue>Set Exit long position by a stop order</StringValue>
  781.               </NinjaScriptString>
  782.             </Strings>
  783.           </Tag>
  784.           <TextPosition>BottomLeft</TextPosition>
  785.           <VariableDateTime>2019-10-14T14:39:33.0875786</VariableDateTime>
  786.           <VariableBool>false</VariableBool>
  787.         </ActionProperties>
  788.         <ActionType>ExitStop</ActionType>
  789.         <Command>
  790.           <Command>ExitLongStopMarket</Command>
  791.           <Parameters>
  792.             <string>quantity</string>
  793.             <string>stopPrice</string>
  794.             <string>signalName</string>
  795.             <string>fromEntrySignal</string>
  796.           </Parameters>
  797.         </Command>
  798.       </ActiveAction>
  799.       <AnyOrAll>All</AnyOrAll>
  800.       <Conditions>
  801.         <WizardConditionGroup>
  802.           <AnyOrAll>Any</AnyOrAll>
  803.           <Conditions>
  804.             <WizardCondition>
  805.               <LeftItem xsi:type="WizardConditionItem">
  806.                 <Children />
  807.                 <IsExpanded>true</IsExpanded>
  808.                 <IsSelected>true</IsSelected>
  809.                 <Name>Current market position</Name>
  810.                 <OffsetType>Arithmetic</OffsetType>
  811.                 <AssignedCommand>
  812.                   <Command>Position.MarketPosition</Command>
  813.                   <Parameters />
  814.                 </AssignedCommand>
  815.                 <BarsAgo>0</BarsAgo>
  816.                 <CurrencyType>Currency</CurrencyType>
  817.                 <Date>2019-06-13T07:14:19.3450078</Date>
  818.                 <DayOfWeek>Sunday</DayOfWeek>
  819.                 <EndBar>0</EndBar>
  820.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  821.                 <LookBackPeriod>0</LookBackPeriod>
  822.                 <MarketPosition>Long</MarketPosition>
  823.                 <Period>0</Period>
  824.                 <ReturnType>MarketData</ReturnType>
  825.                 <StartBar>0</StartBar>
  826.                 <State>Undefined</State>
  827.                 <Time>0001-01-01T00:00:00</Time>
  828.               </LeftItem>
  829.               <Lookback>1</Lookback>
  830.               <Operator>Equals</Operator>
  831.               <RightItem xsi:type="WizardConditionItem">
  832.                 <Children />
  833.                 <IsExpanded>true</IsExpanded>
  834.                 <IsSelected>true</IsSelected>
  835.                 <Name>Market position</Name>
  836.                 <OffsetType>Arithmetic</OffsetType>
  837.                 <AssignedCommand>
  838.                   <Command>MarketPosition.{0}</Command>
  839.                   <Parameters>
  840.                     <string>MarketPosition</string>
  841.                   </Parameters>
  842.                 </AssignedCommand>
  843.                 <BarsAgo>0</BarsAgo>
  844.                 <CurrencyType>Currency</CurrencyType>
  845.                 <Date>2019-06-13T07:14:19.3509917</Date>
  846.                 <DayOfWeek>Sunday</DayOfWeek>
  847.                 <EndBar>0</EndBar>
  848.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  849.                 <LookBackPeriod>0</LookBackPeriod>
  850.                 <MarketPosition>Long</MarketPosition>
  851.                 <Period>0</Period>
  852.                 <ReturnType>MarketData</ReturnType>
  853.                 <StartBar>0</StartBar>
  854.                 <State>Undefined</State>
  855.                 <Time>0001-01-01T00:00:00</Time>
  856.               </RightItem>
  857.             </WizardCondition>
  858.           </Conditions>
  859.           <IsGroup>false</IsGroup>
  860.           <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
  861.         </WizardConditionGroup>
  862.         <WizardConditionGroup>
  863.           <AnyOrAll>Any</AnyOrAll>
  864.           <Conditions>
  865.             <WizardCondition>
  866.               <LeftItem xsi:type="WizardConditionItem">
  867.                 <Children />
  868.                 <IsExpanded>false</IsExpanded>
  869.                 <IsSelected>true</IsSelected>
  870.                 <Name>StopLossMode</Name>
  871.                 <OffsetType>Arithmetic</OffsetType>
  872.                 <AssignedCommand>
  873.                   <Command>StopLossMode</Command>
  874.                   <Parameters />
  875.                 </AssignedCommand>
  876.                 <BarsAgo>0</BarsAgo>
  877.                 <CurrencyType>Currency</CurrencyType>
  878.                 <Date>2019-10-14T14:33:48.9142075</Date>
  879.                 <DayOfWeek>Sunday</DayOfWeek>
  880.                 <EndBar>0</EndBar>
  881.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  882.                 <LookBackPeriod>0</LookBackPeriod>
  883.                 <MarketPosition>Long</MarketPosition>
  884.                 <Period>0</Period>
  885.                 <ReturnType>Number</ReturnType>
  886.                 <StartBar>0</StartBar>
  887.                 <State>Undefined</State>
  888.                 <Time>0001-01-01T00:00:00</Time>
  889.               </LeftItem>
  890.               <Lookback>1</Lookback>
  891.               <Operator>Equals</Operator>
  892.               <RightItem xsi:type="WizardConditionItem">
  893.                 <Children />
  894.                 <IsExpanded>false</IsExpanded>
  895.                 <IsSelected>true</IsSelected>
  896.                 <Name>Numeric value</Name>
  897.                 <OffsetType>Arithmetic</OffsetType>
  898.                 <AssignedCommand>
  899.                   <Command>{0}</Command>
  900.                   <Parameters>
  901.                     <string>NumericValue</string>
  902.                   </Parameters>
  903.                 </AssignedCommand>
  904.                 <BarsAgo>0</BarsAgo>
  905.                 <CurrencyType>Currency</CurrencyType>
  906.                 <Date>2019-10-14T14:33:48.9262012</Date>
  907.                 <DayOfWeek>Sunday</DayOfWeek>
  908.                 <EndBar>0</EndBar>
  909.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  910.                 <LookBackPeriod>0</LookBackPeriod>
  911.                 <MarketPosition>Long</MarketPosition>
  912.                 <Period>0</Period>
  913.                 <ReturnType>Number</ReturnType>
  914.                 <StartBar>0</StartBar>
  915.                 <State>Undefined</State>
  916.                 <Time>0001-01-01T00:00:00</Time>
  917.               </RightItem>
  918.             </WizardCondition>
  919.           </Conditions>
  920.           <IsGroup>false</IsGroup>
  921.           <DisplayName>StopLossMode = 0</DisplayName>
  922.         </WizardConditionGroup>
  923.       </Conditions>
  924.       <SetName>Set 2</SetName>
  925.       <SetNumber>2</SetNumber>
  926.     </ConditionalAction>
  927.     <ConditionalAction>
  928.       <Actions>
  929.         <WizardAction>
  930.           <Children />
  931.           <IsExpanded>false</IsExpanded>
  932.           <IsSelected>true</IsSelected>
  933.           <Name>Exit long position by a stop order</Name>
  934.           <OffsetType>Arithmetic</OffsetType>
  935.           <ActionProperties>
  936.             <DashStyle>Solid</DashStyle>
  937.             <DivideTimePrice>false</DivideTimePrice>
  938.             <Id />
  939.             <File />
  940.             <IsAutoScale>false</IsAutoScale>
  941.             <IsSimulatedStop>false</IsSimulatedStop>
  942.             <IsStop>false</IsStop>
  943.             <LogLevel>Information</LogLevel>
  944.             <Mode>Currency</Mode>
  945.             <OffsetType>Currency</OffsetType>
  946.             <Priority>Medium</Priority>
  947.             <Quantity>
  948.               <DefaultValue>0</DefaultValue>
  949.               <IsInt>true</IsInt>
  950.               <DynamicValue>
  951.                 <Children />
  952.                 <IsExpanded>false</IsExpanded>
  953.                 <IsSelected>false</IsSelected>
  954.                 <Name>Default order quantity</Name>
  955.                 <OffsetType>Arithmetic</OffsetType>
  956.                 <AssignedCommand>
  957.                   <Command>DefaultQuantity</Command>
  958.                   <Parameters />
  959.                 </AssignedCommand>
  960.                 <BarsAgo>0</BarsAgo>
  961.                 <CurrencyType>Currency</CurrencyType>
  962.                 <Date>2019-10-14T14:40:06.4905993</Date>
  963.                 <DayOfWeek>Sunday</DayOfWeek>
  964.                 <EndBar>0</EndBar>
  965.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  966.                 <LookBackPeriod>0</LookBackPeriod>
  967.                 <MarketPosition>Long</MarketPosition>
  968.                 <Period>0</Period>
  969.                 <ReturnType>Number</ReturnType>
  970.                 <StartBar>0</StartBar>
  971.                 <State>Undefined</State>
  972.                 <Time>0001-01-01T00:00:00</Time>
  973.               </DynamicValue>
  974.               <IsLiteral>false</IsLiteral>
  975.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  976.             </Quantity>
  977.             <ServiceName />
  978.             <ScreenshotPath />
  979.             <SoundLocation />
  980.             <StopPrice>
  981.               <DefaultValue>0</DefaultValue>
  982.               <IsInt>false</IsInt>
  983.               <DynamicValue>
  984.                 <Children />
  985.                 <IsExpanded>false</IsExpanded>
  986.                 <IsSelected>true</IsSelected>
  987.                 <Name>Average position price</Name>
  988.                 <OffsetType>Arithmetic</OffsetType>
  989.                 <AssignedCommand>
  990.                   <Command>Position.AveragePrice</Command>
  991.                   <Parameters>
  992.                     <string>OffsetBuilder</string>
  993.                   </Parameters>
  994.                 </AssignedCommand>
  995.                 <BarsAgo>0</BarsAgo>
  996.                 <CurrencyType>Currency</CurrencyType>
  997.                 <Date>2019-10-14T14:40:11.4473357</Date>
  998.                 <DayOfWeek>Sunday</DayOfWeek>
  999.                 <EndBar>0</EndBar>
  1000.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1001.                 <LookBackPeriod>0</LookBackPeriod>
  1002.                 <MarketPosition>Long</MarketPosition>
  1003.                 <Period>0</Period>
  1004.                 <ReturnType>Number</ReturnType>
  1005.                 <StartBar>0</StartBar>
  1006.                 <State>Undefined</State>
  1007.                 <Time>0001-01-01T00:00:00</Time>
  1008.               </DynamicValue>
  1009.               <IsLiteral>false</IsLiteral>
  1010.               <LiveValue xsi:type="xsd:string">Position.AveragePrice</LiveValue>
  1011.             </StopPrice>
  1012.             <Tag>
  1013.               <SeparatorCharacter> </SeparatorCharacter>
  1014.               <Strings>
  1015.                 <NinjaScriptString>
  1016.                   <Index>0</Index>
  1017.                   <StringValue>Set Exit long position by a stop order</StringValue>
  1018.                 </NinjaScriptString>
  1019.               </Strings>
  1020.             </Tag>
  1021.             <TextPosition>BottomLeft</TextPosition>
  1022.             <VariableDateTime>2019-10-14T14:40:06.4905993</VariableDateTime>
  1023.             <VariableBool>false</VariableBool>
  1024.           </ActionProperties>
  1025.           <ActionType>ExitStop</ActionType>
  1026.           <Command>
  1027.             <Command>ExitLongStopMarket</Command>
  1028.             <Parameters>
  1029.               <string>quantity</string>
  1030.               <string>stopPrice</string>
  1031.               <string>signalName</string>
  1032.               <string>fromEntrySignal</string>
  1033.             </Parameters>
  1034.           </Command>
  1035.         </WizardAction>
  1036.       </Actions>
  1037.       <ActiveAction>
  1038.         <Children />
  1039.         <IsExpanded>false</IsExpanded>
  1040.         <IsSelected>true</IsSelected>
  1041.         <Name>Exit long position by a stop order</Name>
  1042.         <OffsetType>Arithmetic</OffsetType>
  1043.         <ActionProperties>
  1044.           <DashStyle>Solid</DashStyle>
  1045.           <DivideTimePrice>false</DivideTimePrice>
  1046.           <Id />
  1047.           <File />
  1048.           <IsAutoScale>false</IsAutoScale>
  1049.           <IsSimulatedStop>false</IsSimulatedStop>
  1050.           <IsStop>false</IsStop>
  1051.           <LogLevel>Information</LogLevel>
  1052.           <Mode>Currency</Mode>
  1053.           <OffsetType>Currency</OffsetType>
  1054.           <Priority>Medium</Priority>
  1055.           <Quantity>
  1056.             <DefaultValue>0</DefaultValue>
  1057.             <IsInt>true</IsInt>
  1058.             <DynamicValue>
  1059.               <Children />
  1060.               <IsExpanded>false</IsExpanded>
  1061.               <IsSelected>false</IsSelected>
  1062.               <Name>Default order quantity</Name>
  1063.               <OffsetType>Arithmetic</OffsetType>
  1064.               <AssignedCommand>
  1065.                 <Command>DefaultQuantity</Command>
  1066.                 <Parameters />
  1067.               </AssignedCommand>
  1068.               <BarsAgo>0</BarsAgo>
  1069.               <CurrencyType>Currency</CurrencyType>
  1070.               <Date>2019-10-14T14:40:06.4905993</Date>
  1071.               <DayOfWeek>Sunday</DayOfWeek>
  1072.               <EndBar>0</EndBar>
  1073.               <ForceSeriesIndex>false</ForceSeriesIndex>
  1074.               <LookBackPeriod>0</LookBackPeriod>
  1075.               <MarketPosition>Long</MarketPosition>
  1076.               <Period>0</Period>
  1077.               <ReturnType>Number</ReturnType>
  1078.               <StartBar>0</StartBar>
  1079.               <State>Undefined</State>
  1080.               <Time>0001-01-01T00:00:00</Time>
  1081.             </DynamicValue>
  1082.             <IsLiteral>false</IsLiteral>
  1083.             <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  1084.           </Quantity>
  1085.           <ServiceName />
  1086.           <ScreenshotPath />
  1087.           <SoundLocation />
  1088.           <StopPrice>
  1089.             <DefaultValue>0</DefaultValue>
  1090.             <IsInt>false</IsInt>
  1091.             <DynamicValue>
  1092.               <Children />
  1093.               <IsExpanded>false</IsExpanded>
  1094.               <IsSelected>true</IsSelected>
  1095.               <Name>Average position price</Name>
  1096.               <OffsetType>Arithmetic</OffsetType>
  1097.               <AssignedCommand>
  1098.                 <Command>Position.AveragePrice</Command>
  1099.                 <Parameters>
  1100.                   <string>OffsetBuilder</string>
  1101.                 </Parameters>
  1102.               </AssignedCommand>
  1103.               <BarsAgo>0</BarsAgo>
  1104.               <CurrencyType>Currency</CurrencyType>
  1105.               <Date>2019-10-14T14:40:11.4473357</Date>
  1106.               <DayOfWeek>Sunday</DayOfWeek>
  1107.               <EndBar>0</EndBar>
  1108.               <ForceSeriesIndex>false</ForceSeriesIndex>
  1109.               <LookBackPeriod>0</LookBackPeriod>
  1110.               <MarketPosition>Long</MarketPosition>
  1111.               <Period>0</Period>
  1112.               <ReturnType>Number</ReturnType>
  1113.               <StartBar>0</StartBar>
  1114.               <State>Undefined</State>
  1115.               <Time>0001-01-01T00:00:00</Time>
  1116.             </DynamicValue>
  1117.             <IsLiteral>false</IsLiteral>
  1118.             <LiveValue xsi:type="xsd:string">Position.AveragePrice</LiveValue>
  1119.           </StopPrice>
  1120.           <Tag>
  1121.             <SeparatorCharacter> </SeparatorCharacter>
  1122.             <Strings>
  1123.               <NinjaScriptString>
  1124.                 <Index>0</Index>
  1125.                 <StringValue>Set Exit long position by a stop order</StringValue>
  1126.               </NinjaScriptString>
  1127.             </Strings>
  1128.           </Tag>
  1129.           <TextPosition>BottomLeft</TextPosition>
  1130.           <VariableDateTime>2019-10-14T14:40:06.4905993</VariableDateTime>
  1131.           <VariableBool>false</VariableBool>
  1132.         </ActionProperties>
  1133.         <ActionType>ExitStop</ActionType>
  1134.         <Command>
  1135.           <Command>ExitLongStopMarket</Command>
  1136.           <Parameters>
  1137.             <string>quantity</string>
  1138.             <string>stopPrice</string>
  1139.             <string>signalName</string>
  1140.             <string>fromEntrySignal</string>
  1141.           </Parameters>
  1142.         </Command>
  1143.       </ActiveAction>
  1144.       <AnyOrAll>All</AnyOrAll>
  1145.       <Conditions>
  1146.         <WizardConditionGroup>
  1147.           <AnyOrAll>Any</AnyOrAll>
  1148.           <Conditions>
  1149.             <WizardCondition>
  1150.               <LeftItem xsi:type="WizardConditionItem">
  1151.                 <Children />
  1152.                 <IsExpanded>false</IsExpanded>
  1153.                 <IsSelected>true</IsSelected>
  1154.                 <Name>Current market position</Name>
  1155.                 <OffsetType>Arithmetic</OffsetType>
  1156.                 <AssignedCommand>
  1157.                   <Command>Position.MarketPosition</Command>
  1158.                   <Parameters />
  1159.                 </AssignedCommand>
  1160.                 <BarsAgo>0</BarsAgo>
  1161.                 <CurrencyType>Currency</CurrencyType>
  1162.                 <Date>2019-06-13T07:14:19.3450078</Date>
  1163.                 <DayOfWeek>Sunday</DayOfWeek>
  1164.                 <EndBar>0</EndBar>
  1165.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1166.                 <LookBackPeriod>0</LookBackPeriod>
  1167.                 <MarketPosition>Long</MarketPosition>
  1168.                 <Period>0</Period>
  1169.                 <ReturnType>MarketData</ReturnType>
  1170.                 <StartBar>0</StartBar>
  1171.                 <State>Undefined</State>
  1172.                 <Time>0001-01-01T00:00:00</Time>
  1173.               </LeftItem>
  1174.               <Lookback>1</Lookback>
  1175.               <Operator>Equals</Operator>
  1176.               <RightItem xsi:type="WizardConditionItem">
  1177.                 <Children />
  1178.                 <IsExpanded>false</IsExpanded>
  1179.                 <IsSelected>true</IsSelected>
  1180.                 <Name>Market position</Name>
  1181.                 <OffsetType>Arithmetic</OffsetType>
  1182.                 <AssignedCommand>
  1183.                   <Command>MarketPosition.{0}</Command>
  1184.                   <Parameters>
  1185.                     <string>MarketPosition</string>
  1186.                   </Parameters>
  1187.                 </AssignedCommand>
  1188.                 <BarsAgo>0</BarsAgo>
  1189.                 <CurrencyType>Currency</CurrencyType>
  1190.                 <Date>2019-06-13T07:14:19.3509917</Date>
  1191.                 <DayOfWeek>Sunday</DayOfWeek>
  1192.                 <EndBar>0</EndBar>
  1193.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1194.                 <LookBackPeriod>0</LookBackPeriod>
  1195.                 <MarketPosition>Long</MarketPosition>
  1196.                 <Period>0</Period>
  1197.                 <ReturnType>MarketData</ReturnType>
  1198.                 <StartBar>0</StartBar>
  1199.                 <State>Undefined</State>
  1200.                 <Time>0001-01-01T00:00:00</Time>
  1201.               </RightItem>
  1202.             </WizardCondition>
  1203.           </Conditions>
  1204.           <IsGroup>false</IsGroup>
  1205.           <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
  1206.         </WizardConditionGroup>
  1207.         <WizardConditionGroup>
  1208.           <AnyOrAll>Any</AnyOrAll>
  1209.           <Conditions>
  1210.             <WizardCondition>
  1211.               <LeftItem xsi:type="WizardConditionItem">
  1212.                 <Children />
  1213.                 <IsExpanded>false</IsExpanded>
  1214.                 <IsSelected>true</IsSelected>
  1215.                 <Name>StopLossMode</Name>
  1216.                 <OffsetType>Arithmetic</OffsetType>
  1217.                 <AssignedCommand>
  1218.                   <Command>StopLossMode</Command>
  1219.                   <Parameters />
  1220.                 </AssignedCommand>
  1221.                 <BarsAgo>0</BarsAgo>
  1222.                 <CurrencyType>Currency</CurrencyType>
  1223.                 <Date>2019-10-14T14:32:06.718673</Date>
  1224.                 <DayOfWeek>Sunday</DayOfWeek>
  1225.                 <EndBar>0</EndBar>
  1226.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1227.                 <LookBackPeriod>0</LookBackPeriod>
  1228.                 <MarketPosition>Long</MarketPosition>
  1229.                 <Period>0</Period>
  1230.                 <ReturnType>Number</ReturnType>
  1231.                 <StartBar>0</StartBar>
  1232.                 <State>Undefined</State>
  1233.                 <Time>0001-01-01T00:00:00</Time>
  1234.               </LeftItem>
  1235.               <Lookback>1</Lookback>
  1236.               <Operator>Equals</Operator>
  1237.               <RightItem xsi:type="WizardConditionItem">
  1238.                 <Children />
  1239.                 <IsExpanded>false</IsExpanded>
  1240.                 <IsSelected>true</IsSelected>
  1241.                 <Name>Numeric value</Name>
  1242.                 <OffsetType>Arithmetic</OffsetType>
  1243.                 <AssignedCommand>
  1244.                   <Command>{0}</Command>
  1245.                   <Parameters>
  1246.                     <string>NumericValue</string>
  1247.                   </Parameters>
  1248.                 </AssignedCommand>
  1249.                 <BarsAgo>0</BarsAgo>
  1250.                 <CurrencyType>Currency</CurrencyType>
  1251.                 <Date>2019-10-14T14:32:06.7226707</Date>
  1252.                 <DayOfWeek>Sunday</DayOfWeek>
  1253.                 <EndBar>0</EndBar>
  1254.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1255.                 <LookBackPeriod>0</LookBackPeriod>
  1256.                 <MarketPosition>Long</MarketPosition>
  1257.                 <NumericValue>
  1258.                   <DefaultValue>0</DefaultValue>
  1259.                   <IsInt>false</IsInt>
  1260.                   <IsLiteral>true</IsLiteral>
  1261.                   <LiveValue xsi:type="xsd:string">1</LiveValue>
  1262.                 </NumericValue>
  1263.                 <Period>0</Period>
  1264.                 <ReturnType>Number</ReturnType>
  1265.                 <StartBar>0</StartBar>
  1266.                 <State>Undefined</State>
  1267.                 <Time>0001-01-01T00:00:00</Time>
  1268.               </RightItem>
  1269.             </WizardCondition>
  1270.           </Conditions>
  1271.           <IsGroup>false</IsGroup>
  1272.           <DisplayName>StopLossMode = 1</DisplayName>
  1273.         </WizardConditionGroup>
  1274.       </Conditions>
  1275.       <SetName>Set 3</SetName>
  1276.       <SetNumber>3</SetNumber>
  1277.     </ConditionalAction>
  1278.     <ConditionalAction>
  1279.       <Actions>
  1280.         <WizardAction>
  1281.           <Children />
  1282.           <IsExpanded>false</IsExpanded>
  1283.           <IsSelected>true</IsSelected>
  1284.           <Name>Exit long position by a stop order</Name>
  1285.           <OffsetType>Arithmetic</OffsetType>
  1286.           <ActionProperties>
  1287.             <DashStyle>Solid</DashStyle>
  1288.             <DivideTimePrice>false</DivideTimePrice>
  1289.             <Id />
  1290.             <File />
  1291.             <IsAutoScale>false</IsAutoScale>
  1292.             <IsSimulatedStop>false</IsSimulatedStop>
  1293.             <IsStop>false</IsStop>
  1294.             <LogLevel>Information</LogLevel>
  1295.             <Mode>Currency</Mode>
  1296.             <OffsetType>Currency</OffsetType>
  1297.             <Priority>Medium</Priority>
  1298.             <Quantity>
  1299.               <DefaultValue>0</DefaultValue>
  1300.               <IsInt>true</IsInt>
  1301.               <DynamicValue>
  1302.                 <Children />
  1303.                 <IsExpanded>false</IsExpanded>
  1304.                 <IsSelected>false</IsSelected>
  1305.                 <Name>Default order quantity</Name>
  1306.                 <OffsetType>Arithmetic</OffsetType>
  1307.                 <AssignedCommand>
  1308.                   <Command>DefaultQuantity</Command>
  1309.                   <Parameters />
  1310.                 </AssignedCommand>
  1311.                 <BarsAgo>0</BarsAgo>
  1312.                 <CurrencyType>Currency</CurrencyType>
  1313.                 <Date>2019-10-14T14:40:37.9509102</Date>
  1314.                 <DayOfWeek>Sunday</DayOfWeek>
  1315.                 <EndBar>0</EndBar>
  1316.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1317.                 <LookBackPeriod>0</LookBackPeriod>
  1318.                 <MarketPosition>Long</MarketPosition>
  1319.                 <Period>0</Period>
  1320.                 <ReturnType>Number</ReturnType>
  1321.                 <StartBar>0</StartBar>
  1322.                 <State>Undefined</State>
  1323.                 <Time>0001-01-01T00:00:00</Time>
  1324.               </DynamicValue>
  1325.               <IsLiteral>false</IsLiteral>
  1326.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  1327.             </Quantity>
  1328.             <ServiceName />
  1329.             <ScreenshotPath />
  1330.             <SoundLocation />
  1331.             <StopPrice>
  1332.               <DefaultValue>0</DefaultValue>
  1333.               <IsInt>false</IsInt>
  1334.               <DynamicValue>
  1335.                 <Children />
  1336.                 <IsExpanded>false</IsExpanded>
  1337.                 <IsSelected>true</IsSelected>
  1338.                 <Name>Average position price</Name>
  1339.                 <OffsetType>Arithmetic</OffsetType>
  1340.                 <AssignedCommand>
  1341.                   <Command>Position.AveragePrice</Command>
  1342.                   <Parameters>
  1343.                     <string>OffsetBuilder</string>
  1344.                   </Parameters>
  1345.                 </AssignedCommand>
  1346.                 <BarsAgo>0</BarsAgo>
  1347.                 <CurrencyType>Currency</CurrencyType>
  1348.                 <Date>2019-10-14T14:40:44.2174824</Date>
  1349.                 <DayOfWeek>Sunday</DayOfWeek>
  1350.                 <EndBar>0</EndBar>
  1351.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1352.                 <LookBackPeriod>0</LookBackPeriod>
  1353.                 <MarketPosition>Long</MarketPosition>
  1354.                 <OffsetBuilder>
  1355.                   <ConditionOffset>
  1356.                     <IsSetEnabled>false</IsSetEnabled>
  1357.                     <OffsetValue>0</OffsetValue>
  1358.                     <OffsetOperator>Add</OffsetOperator>
  1359.                     <OffsetType>Ticks</OffsetType>
  1360.                   </ConditionOffset>
  1361.                   <Offset>
  1362.                     <DefaultValue>0</DefaultValue>
  1363.                     <IsInt>false</IsInt>
  1364.                     <IsLiteral>true</IsLiteral>
  1365.                     <LiveValue xsi:type="xsd:string">10</LiveValue>
  1366.                   </Offset>
  1367.                 </OffsetBuilder>
  1368.                 <Period>0</Period>
  1369.                 <ReturnType>Number</ReturnType>
  1370.                 <StartBar>0</StartBar>
  1371.                 <State>Undefined</State>
  1372.                 <Time>0001-01-01T00:00:00</Time>
  1373.               </DynamicValue>
  1374.               <IsLiteral>false</IsLiteral>
  1375.               <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (10 * TickSize)) </LiveValue>
  1376.             </StopPrice>
  1377.             <Tag>
  1378.               <SeparatorCharacter> </SeparatorCharacter>
  1379.               <Strings>
  1380.                 <NinjaScriptString>
  1381.                   <Index>0</Index>
  1382.                   <StringValue>Set Exit long position by a stop order</StringValue>
  1383.                 </NinjaScriptString>
  1384.               </Strings>
  1385.             </Tag>
  1386.             <TextPosition>BottomLeft</TextPosition>
  1387.             <VariableDateTime>2019-10-14T14:40:37.9509102</VariableDateTime>
  1388.             <VariableBool>false</VariableBool>
  1389.           </ActionProperties>
  1390.           <ActionType>ExitStop</ActionType>
  1391.           <Command>
  1392.             <Command>ExitLongStopMarket</Command>
  1393.             <Parameters>
  1394.               <string>quantity</string>
  1395.               <string>stopPrice</string>
  1396.               <string>signalName</string>
  1397.               <string>fromEntrySignal</string>
  1398.             </Parameters>
  1399.           </Command>
  1400.         </WizardAction>
  1401.       </Actions>
  1402.       <ActiveAction>
  1403.         <Children />
  1404.         <IsExpanded>false</IsExpanded>
  1405.         <IsSelected>true</IsSelected>
  1406.         <Name>Exit long position by a stop order</Name>
  1407.         <OffsetType>Arithmetic</OffsetType>
  1408.         <ActionProperties>
  1409.           <DashStyle>Solid</DashStyle>
  1410.           <DivideTimePrice>false</DivideTimePrice>
  1411.           <Id />
  1412.           <File />
  1413.           <IsAutoScale>false</IsAutoScale>
  1414.           <IsSimulatedStop>false</IsSimulatedStop>
  1415.           <IsStop>false</IsStop>
  1416.           <LogLevel>Information</LogLevel>
  1417.           <Mode>Currency</Mode>
  1418.           <OffsetType>Currency</OffsetType>
  1419.           <Priority>Medium</Priority>
  1420.           <Quantity>
  1421.             <DefaultValue>0</DefaultValue>
  1422.             <IsInt>true</IsInt>
  1423.             <DynamicValue>
  1424.               <Children />
  1425.               <IsExpanded>false</IsExpanded>
  1426.               <IsSelected>false</IsSelected>
  1427.               <Name>Default order quantity</Name>
  1428.               <OffsetType>Arithmetic</OffsetType>
  1429.               <AssignedCommand>
  1430.                 <Command>DefaultQuantity</Command>
  1431.                 <Parameters />
  1432.               </AssignedCommand>
  1433.               <BarsAgo>0</BarsAgo>
  1434.               <CurrencyType>Currency</CurrencyType>
  1435.               <Date>2019-10-14T14:40:37.9509102</Date>
  1436.               <DayOfWeek>Sunday</DayOfWeek>
  1437.               <EndBar>0</EndBar>
  1438.               <ForceSeriesIndex>false</ForceSeriesIndex>
  1439.               <LookBackPeriod>0</LookBackPeriod>
  1440.               <MarketPosition>Long</MarketPosition>
  1441.               <Period>0</Period>
  1442.               <ReturnType>Number</ReturnType>
  1443.               <StartBar>0</StartBar>
  1444.               <State>Undefined</State>
  1445.               <Time>0001-01-01T00:00:00</Time>
  1446.             </DynamicValue>
  1447.             <IsLiteral>false</IsLiteral>
  1448.             <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  1449.           </Quantity>
  1450.           <ServiceName />
  1451.           <ScreenshotPath />
  1452.           <SoundLocation />
  1453.           <StopPrice>
  1454.             <DefaultValue>0</DefaultValue>
  1455.             <IsInt>false</IsInt>
  1456.             <DynamicValue>
  1457.               <Children />
  1458.               <IsExpanded>false</IsExpanded>
  1459.               <IsSelected>true</IsSelected>
  1460.               <Name>Average position price</Name>
  1461.               <OffsetType>Arithmetic</OffsetType>
  1462.               <AssignedCommand>
  1463.                 <Command>Position.AveragePrice</Command>
  1464.                 <Parameters>
  1465.                   <string>OffsetBuilder</string>
  1466.                 </Parameters>
  1467.               </AssignedCommand>
  1468.               <BarsAgo>0</BarsAgo>
  1469.               <CurrencyType>Currency</CurrencyType>
  1470.               <Date>2019-10-14T14:40:44.2174824</Date>
  1471.               <DayOfWeek>Sunday</DayOfWeek>
  1472.               <EndBar>0</EndBar>
  1473.               <ForceSeriesIndex>false</ForceSeriesIndex>
  1474.               <LookBackPeriod>0</LookBackPeriod>
  1475.               <MarketPosition>Long</MarketPosition>
  1476.               <OffsetBuilder>
  1477.                 <ConditionOffset>
  1478.                   <IsSetEnabled>false</IsSetEnabled>
  1479.                   <OffsetValue>0</OffsetValue>
  1480.                   <OffsetOperator>Add</OffsetOperator>
  1481.                   <OffsetType>Ticks</OffsetType>
  1482.                 </ConditionOffset>
  1483.                 <Offset>
  1484.                   <DefaultValue>0</DefaultValue>
  1485.                   <IsInt>false</IsInt>
  1486.                   <IsLiteral>true</IsLiteral>
  1487.                   <LiveValue xsi:type="xsd:string">10</LiveValue>
  1488.                 </Offset>
  1489.               </OffsetBuilder>
  1490.               <Period>0</Period>
  1491.               <ReturnType>Number</ReturnType>
  1492.               <StartBar>0</StartBar>
  1493.               <State>Undefined</State>
  1494.               <Time>0001-01-01T00:00:00</Time>
  1495.             </DynamicValue>
  1496.             <IsLiteral>false</IsLiteral>
  1497.             <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (10 * TickSize)) </LiveValue>
  1498.           </StopPrice>
  1499.           <Tag>
  1500.             <SeparatorCharacter> </SeparatorCharacter>
  1501.             <Strings>
  1502.               <NinjaScriptString>
  1503.                 <Index>0</Index>
  1504.                 <StringValue>Set Exit long position by a stop order</StringValue>
  1505.               </NinjaScriptString>
  1506.             </Strings>
  1507.           </Tag>
  1508.           <TextPosition>BottomLeft</TextPosition>
  1509.           <VariableDateTime>2019-10-14T14:40:37.9509102</VariableDateTime>
  1510.           <VariableBool>false</VariableBool>
  1511.         </ActionProperties>
  1512.         <ActionType>ExitStop</ActionType>
  1513.         <Command>
  1514.           <Command>ExitLongStopMarket</Command>
  1515.           <Parameters>
  1516.             <string>quantity</string>
  1517.             <string>stopPrice</string>
  1518.             <string>signalName</string>
  1519.             <string>fromEntrySignal</string>
  1520.           </Parameters>
  1521.         </Command>
  1522.       </ActiveAction>
  1523.       <AnyOrAll>All</AnyOrAll>
  1524.       <Conditions>
  1525.         <WizardConditionGroup>
  1526.           <AnyOrAll>Any</AnyOrAll>
  1527.           <Conditions>
  1528.             <WizardCondition>
  1529.               <LeftItem xsi:type="WizardConditionItem">
  1530.                 <Children />
  1531.                 <IsExpanded>false</IsExpanded>
  1532.                 <IsSelected>true</IsSelected>
  1533.                 <Name>Current market position</Name>
  1534.                 <OffsetType>Arithmetic</OffsetType>
  1535.                 <AssignedCommand>
  1536.                   <Command>Position.MarketPosition</Command>
  1537.                   <Parameters />
  1538.                 </AssignedCommand>
  1539.                 <BarsAgo>0</BarsAgo>
  1540.                 <CurrencyType>Currency</CurrencyType>
  1541.                 <Date>2019-06-13T07:14:19.3450078</Date>
  1542.                 <DayOfWeek>Sunday</DayOfWeek>
  1543.                 <EndBar>0</EndBar>
  1544.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1545.                 <LookBackPeriod>0</LookBackPeriod>
  1546.                 <MarketPosition>Long</MarketPosition>
  1547.                 <Period>0</Period>
  1548.                 <ReturnType>MarketData</ReturnType>
  1549.                 <StartBar>0</StartBar>
  1550.                 <State>Undefined</State>
  1551.                 <Time>0001-01-01T00:00:00</Time>
  1552.               </LeftItem>
  1553.               <Lookback>1</Lookback>
  1554.               <Operator>Equals</Operator>
  1555.               <RightItem xsi:type="WizardConditionItem">
  1556.                 <Children />
  1557.                 <IsExpanded>false</IsExpanded>
  1558.                 <IsSelected>true</IsSelected>
  1559.                 <Name>Market position</Name>
  1560.                 <OffsetType>Arithmetic</OffsetType>
  1561.                 <AssignedCommand>
  1562.                   <Command>MarketPosition.{0}</Command>
  1563.                   <Parameters>
  1564.                     <string>MarketPosition</string>
  1565.                   </Parameters>
  1566.                 </AssignedCommand>
  1567.                 <BarsAgo>0</BarsAgo>
  1568.                 <CurrencyType>Currency</CurrencyType>
  1569.                 <Date>2019-06-13T07:14:19.3509917</Date>
  1570.                 <DayOfWeek>Sunday</DayOfWeek>
  1571.                 <EndBar>0</EndBar>
  1572.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1573.                 <LookBackPeriod>0</LookBackPeriod>
  1574.                 <MarketPosition>Long</MarketPosition>
  1575.                 <Period>0</Period>
  1576.                 <ReturnType>MarketData</ReturnType>
  1577.                 <StartBar>0</StartBar>
  1578.                 <State>Undefined</State>
  1579.                 <Time>0001-01-01T00:00:00</Time>
  1580.               </RightItem>
  1581.             </WizardCondition>
  1582.           </Conditions>
  1583.           <IsGroup>false</IsGroup>
  1584.           <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
  1585.         </WizardConditionGroup>
  1586.         <WizardConditionGroup>
  1587.           <AnyOrAll>Any</AnyOrAll>
  1588.           <Conditions>
  1589.             <WizardCondition>
  1590.               <LeftItem xsi:type="WizardConditionItem">
  1591.                 <Children />
  1592.                 <IsExpanded>true</IsExpanded>
  1593.                 <IsSelected>true</IsSelected>
  1594.                 <Name>StopLossMode</Name>
  1595.                 <OffsetType>Arithmetic</OffsetType>
  1596.                 <AssignedCommand>
  1597.                   <Command>StopLossMode</Command>
  1598.                   <Parameters />
  1599.                 </AssignedCommand>
  1600.                 <BarsAgo>0</BarsAgo>
  1601.                 <CurrencyType>Currency</CurrencyType>
  1602.                 <Date>2019-10-14T14:32:27.971715</Date>
  1603.                 <DayOfWeek>Sunday</DayOfWeek>
  1604.                 <EndBar>0</EndBar>
  1605.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1606.                 <LookBackPeriod>0</LookBackPeriod>
  1607.                 <MarketPosition>Long</MarketPosition>
  1608.                 <Period>0</Period>
  1609.                 <ReturnType>Number</ReturnType>
  1610.                 <StartBar>0</StartBar>
  1611.                 <State>Undefined</State>
  1612.                 <Time>0001-01-01T00:00:00</Time>
  1613.               </LeftItem>
  1614.               <Lookback>1</Lookback>
  1615.               <Operator>Equals</Operator>
  1616.               <RightItem xsi:type="WizardConditionItem">
  1617.                 <Children />
  1618.                 <IsExpanded>true</IsExpanded>
  1619.                 <IsSelected>true</IsSelected>
  1620.                 <Name>Numeric value</Name>
  1621.                 <OffsetType>Arithmetic</OffsetType>
  1622.                 <AssignedCommand>
  1623.                   <Command>{0}</Command>
  1624.                   <Parameters>
  1625.                     <string>NumericValue</string>
  1626.                   </Parameters>
  1627.                 </AssignedCommand>
  1628.                 <BarsAgo>0</BarsAgo>
  1629.                 <CurrencyType>Currency</CurrencyType>
  1630.                 <Date>2019-10-14T14:32:27.976712</Date>
  1631.                 <DayOfWeek>Sunday</DayOfWeek>
  1632.                 <EndBar>0</EndBar>
  1633.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1634.                 <LookBackPeriod>0</LookBackPeriod>
  1635.                 <MarketPosition>Long</MarketPosition>
  1636.                 <NumericValue>
  1637.                   <DefaultValue>0</DefaultValue>
  1638.                   <IsInt>false</IsInt>
  1639.                   <IsLiteral>true</IsLiteral>
  1640.                   <LiveValue xsi:type="xsd:string">2</LiveValue>
  1641.                 </NumericValue>
  1642.                 <Period>0</Period>
  1643.                 <ReturnType>Number</ReturnType>
  1644.                 <StartBar>0</StartBar>
  1645.                 <State>Undefined</State>
  1646.                 <Time>0001-01-01T00:00:00</Time>
  1647.               </RightItem>
  1648.             </WizardCondition>
  1649.           </Conditions>
  1650.           <IsGroup>false</IsGroup>
  1651.           <DisplayName>StopLossMode = 2</DisplayName>
  1652.         </WizardConditionGroup>
  1653.       </Conditions>
  1654.       <SetName>Set 4</SetName>
  1655.       <SetNumber>4</SetNumber>
  1656.     </ConditionalAction>
  1657.     <ConditionalAction>
  1658.       <Actions>
  1659.         <WizardAction>
  1660.           <Children />
  1661.           <IsExpanded>false</IsExpanded>
  1662.           <IsSelected>true</IsSelected>
  1663.           <Name>Set StopLossMode</Name>
  1664.           <OffsetType>Arithmetic</OffsetType>
  1665.           <ActionProperties>
  1666.             <DashStyle>Solid</DashStyle>
  1667.             <DivideTimePrice>false</DivideTimePrice>
  1668.             <Id />
  1669.             <File />
  1670.             <IsAutoScale>false</IsAutoScale>
  1671.             <IsSimulatedStop>false</IsSimulatedStop>
  1672.             <IsStop>false</IsStop>
  1673.             <LogLevel>Information</LogLevel>
  1674.             <Mode>Currency</Mode>
  1675.             <OffsetType>Currency</OffsetType>
  1676.             <Priority>Medium</Priority>
  1677.             <Quantity>
  1678.               <DefaultValue>0</DefaultValue>
  1679.               <IsInt>true</IsInt>
  1680.               <DynamicValue>
  1681.                 <Children />
  1682.                 <IsExpanded>false</IsExpanded>
  1683.                 <IsSelected>false</IsSelected>
  1684.                 <Name>Default order quantity</Name>
  1685.                 <OffsetType>Arithmetic</OffsetType>
  1686.                 <AssignedCommand>
  1687.                   <Command>DefaultQuantity</Command>
  1688.                   <Parameters />
  1689.                 </AssignedCommand>
  1690.                 <BarsAgo>0</BarsAgo>
  1691.                 <CurrencyType>Currency</CurrencyType>
  1692.                 <Date>2019-10-14T14:35:59.0527402</Date>
  1693.                 <DayOfWeek>Sunday</DayOfWeek>
  1694.                 <EndBar>0</EndBar>
  1695.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1696.                 <LookBackPeriod>0</LookBackPeriod>
  1697.                 <MarketPosition>Long</MarketPosition>
  1698.                 <Period>0</Period>
  1699.                 <ReturnType>Number</ReturnType>
  1700.                 <StartBar>0</StartBar>
  1701.                 <State>Undefined</State>
  1702.                 <Time>0001-01-01T00:00:00</Time>
  1703.               </DynamicValue>
  1704.               <IsLiteral>false</IsLiteral>
  1705.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  1706.             </Quantity>
  1707.             <ServiceName />
  1708.             <ScreenshotPath />
  1709.             <SoundLocation />
  1710.             <TextPosition>BottomLeft</TextPosition>
  1711.             <VariableInt>
  1712.               <DefaultValue>0</DefaultValue>
  1713.               <IsInt>true</IsInt>
  1714.               <IsLiteral>true</IsLiteral>
  1715.               <LiveValue xsi:type="xsd:string">1</LiveValue>
  1716.             </VariableInt>
  1717.             <VariableDateTime>2019-10-14T14:35:59.0527402</VariableDateTime>
  1718.             <VariableBool>false</VariableBool>
  1719.           </ActionProperties>
  1720.           <ActionType>SetValue</ActionType>
  1721.           <UserVariableType>int</UserVariableType>
  1722.           <VariableName>StopLossMode</VariableName>
  1723.         </WizardAction>
  1724.       </Actions>
  1725.       <ActiveAction>
  1726.         <Children />
  1727.         <IsExpanded>false</IsExpanded>
  1728.         <IsSelected>true</IsSelected>
  1729.         <Name>Set StopLossMode</Name>
  1730.         <OffsetType>Arithmetic</OffsetType>
  1731.         <ActionProperties>
  1732.           <DashStyle>Solid</DashStyle>
  1733.           <DivideTimePrice>false</DivideTimePrice>
  1734.           <Id />
  1735.           <File />
  1736.           <IsAutoScale>false</IsAutoScale>
  1737.           <IsSimulatedStop>false</IsSimulatedStop>
  1738.           <IsStop>false</IsStop>
  1739.           <LogLevel>Information</LogLevel>
  1740.           <Mode>Currency</Mode>
  1741.           <OffsetType>Currency</OffsetType>
  1742.           <Priority>Medium</Priority>
  1743.           <Quantity>
  1744.             <DefaultValue>0</DefaultValue>
  1745.             <IsInt>true</IsInt>
  1746.             <DynamicValue>
  1747.               <Children />
  1748.               <IsExpanded>false</IsExpanded>
  1749.               <IsSelected>false</IsSelected>
  1750.               <Name>Default order quantity</Name>
  1751.               <OffsetType>Arithmetic</OffsetType>
  1752.               <AssignedCommand>
  1753.                 <Command>DefaultQuantity</Command>
  1754.                 <Parameters />
  1755.               </AssignedCommand>
  1756.               <BarsAgo>0</BarsAgo>
  1757.               <CurrencyType>Currency</CurrencyType>
  1758.               <Date>2019-10-14T14:35:59.0527402</Date>
  1759.               <DayOfWeek>Sunday</DayOfWeek>
  1760.               <EndBar>0</EndBar>
  1761.               <ForceSeriesIndex>false</ForceSeriesIndex>
  1762.               <LookBackPeriod>0</LookBackPeriod>
  1763.               <MarketPosition>Long</MarketPosition>
  1764.               <Period>0</Period>
  1765.               <ReturnType>Number</ReturnType>
  1766.               <StartBar>0</StartBar>
  1767.               <State>Undefined</State>
  1768.               <Time>0001-01-01T00:00:00</Time>
  1769.             </DynamicValue>
  1770.             <IsLiteral>false</IsLiteral>
  1771.             <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  1772.           </Quantity>
  1773.           <ServiceName />
  1774.           <ScreenshotPath />
  1775.           <SoundLocation />
  1776.           <TextPosition>BottomLeft</TextPosition>
  1777.           <VariableInt>
  1778.             <DefaultValue>0</DefaultValue>
  1779.             <IsInt>true</IsInt>
  1780.             <IsLiteral>true</IsLiteral>
  1781.             <LiveValue xsi:type="xsd:string">1</LiveValue>
  1782.           </VariableInt>
  1783.           <VariableDateTime>2019-10-14T14:35:59.0527402</VariableDateTime>
  1784.           <VariableBool>false</VariableBool>
  1785.         </ActionProperties>
  1786.         <ActionType>SetValue</ActionType>
  1787.         <UserVariableType>int</UserVariableType>
  1788.         <VariableName>StopLossMode</VariableName>
  1789.       </ActiveAction>
  1790.       <AnyOrAll>All</AnyOrAll>
  1791.       <Conditions>
  1792.         <WizardConditionGroup>
  1793.           <AnyOrAll>Any</AnyOrAll>
  1794.           <Conditions>
  1795.             <WizardCondition>
  1796.               <LeftItem xsi:type="WizardConditionItem">
  1797.                 <Children />
  1798.                 <IsExpanded>false</IsExpanded>
  1799.                 <IsSelected>true</IsSelected>
  1800.                 <Name>Current market position</Name>
  1801.                 <OffsetType>Arithmetic</OffsetType>
  1802.                 <AssignedCommand>
  1803.                   <Command>Position.MarketPosition</Command>
  1804.                   <Parameters />
  1805.                 </AssignedCommand>
  1806.                 <BarsAgo>0</BarsAgo>
  1807.                 <CurrencyType>Currency</CurrencyType>
  1808.                 <Date>2019-10-14T14:35:07.0718735</Date>
  1809.                 <DayOfWeek>Sunday</DayOfWeek>
  1810.                 <EndBar>0</EndBar>
  1811.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1812.                 <LookBackPeriod>0</LookBackPeriod>
  1813.                 <MarketPosition>Long</MarketPosition>
  1814.                 <Period>0</Period>
  1815.                 <ReturnType>MarketData</ReturnType>
  1816.                 <StartBar>0</StartBar>
  1817.                 <State>Undefined</State>
  1818.                 <Time>0001-01-01T00:00:00</Time>
  1819.               </LeftItem>
  1820.               <Lookback>1</Lookback>
  1821.               <Operator>Equals</Operator>
  1822.               <RightItem xsi:type="WizardConditionItem">
  1823.                 <Children />
  1824.                 <IsExpanded>false</IsExpanded>
  1825.                 <IsSelected>true</IsSelected>
  1826.                 <Name>Market position</Name>
  1827.                 <OffsetType>Arithmetic</OffsetType>
  1828.                 <AssignedCommand>
  1829.                   <Command>MarketPosition.{0}</Command>
  1830.                   <Parameters>
  1831.                     <string>MarketPosition</string>
  1832.                   </Parameters>
  1833.                 </AssignedCommand>
  1834.                 <BarsAgo>0</BarsAgo>
  1835.                 <CurrencyType>Currency</CurrencyType>
  1836.                 <Date>2019-10-14T14:35:07.0848666</Date>
  1837.                 <DayOfWeek>Sunday</DayOfWeek>
  1838.                 <EndBar>0</EndBar>
  1839.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1840.                 <LookBackPeriod>0</LookBackPeriod>
  1841.                 <MarketPosition>Long</MarketPosition>
  1842.                 <Period>0</Period>
  1843.                 <ReturnType>MarketData</ReturnType>
  1844.                 <StartBar>0</StartBar>
  1845.                 <State>Undefined</State>
  1846.                 <Time>0001-01-01T00:00:00</Time>
  1847.               </RightItem>
  1848.             </WizardCondition>
  1849.           </Conditions>
  1850.           <IsGroup>false</IsGroup>
  1851.           <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
  1852.         </WizardConditionGroup>
  1853.         <WizardConditionGroup>
  1854.           <AnyOrAll>Any</AnyOrAll>
  1855.           <Conditions>
  1856.             <WizardCondition>
  1857.               <LeftItem xsi:type="WizardConditionItem">
  1858.                 <Children />
  1859.                 <IsExpanded>false</IsExpanded>
  1860.                 <IsSelected>true</IsSelected>
  1861.                 <Name>Close</Name>
  1862.                 <OffsetType>Arithmetic</OffsetType>
  1863.                 <AssignedCommand>
  1864.                   <Command>{0}</Command>
  1865.                   <Parameters>
  1866.                     <string>Series1</string>
  1867.                     <string>BarsAgo</string>
  1868.                     <string>OffsetBuilder</string>
  1869.                   </Parameters>
  1870.                 </AssignedCommand>
  1871.                 <BarsAgo>0</BarsAgo>
  1872.                 <CurrencyType>Currency</CurrencyType>
  1873.                 <Date>2019-10-14T14:35:33.1717171</Date>
  1874.                 <DayOfWeek>Sunday</DayOfWeek>
  1875.                 <EndBar>0</EndBar>
  1876.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1877.                 <LookBackPeriod>0</LookBackPeriod>
  1878.                 <MarketPosition>Long</MarketPosition>
  1879.                 <Period>0</Period>
  1880.                 <ReturnType>Series</ReturnType>
  1881.                 <StartBar>0</StartBar>
  1882.                 <State>Undefined</State>
  1883.                 <Time>0001-01-01T00:00:00</Time>
  1884.               </LeftItem>
  1885.               <Lookback>1</Lookback>
  1886.               <Operator>GreaterEqual</Operator>
  1887.               <RightItem xsi:type="WizardConditionItem">
  1888.                 <Children />
  1889.                 <IsExpanded>false</IsExpanded>
  1890.                 <IsSelected>true</IsSelected>
  1891.                 <Name>Average position price</Name>
  1892.                 <OffsetType>Arithmetic</OffsetType>
  1893.                 <AssignedCommand>
  1894.                   <Command>Position.AveragePrice</Command>
  1895.                   <Parameters>
  1896.                     <string>OffsetBuilder</string>
  1897.                   </Parameters>
  1898.                 </AssignedCommand>
  1899.                 <BarsAgo>0</BarsAgo>
  1900.                 <CurrencyType>Currency</CurrencyType>
  1901.                 <Date>2019-10-14T14:35:33.1757104</Date>
  1902.                 <DayOfWeek>Sunday</DayOfWeek>
  1903.                 <EndBar>0</EndBar>
  1904.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1905.                 <LookBackPeriod>0</LookBackPeriod>
  1906.                 <MarketPosition>Long</MarketPosition>
  1907.                 <OffsetBuilder>
  1908.                   <ConditionOffset>
  1909.                     <IsSetEnabled>false</IsSetEnabled>
  1910.                     <OffsetValue>0</OffsetValue>
  1911.                     <OffsetOperator>Add</OffsetOperator>
  1912.                     <OffsetType>Ticks</OffsetType>
  1913.                   </ConditionOffset>
  1914.                   <Offset>
  1915.                     <DefaultValue>0</DefaultValue>
  1916.                     <IsInt>false</IsInt>
  1917.                     <IsLiteral>true</IsLiteral>
  1918.                     <LiveValue xsi:type="xsd:string">10</LiveValue>
  1919.                   </Offset>
  1920.                 </OffsetBuilder>
  1921.                 <Period>0</Period>
  1922.                 <ReturnType>Number</ReturnType>
  1923.                 <StartBar>0</StartBar>
  1924.                 <State>Undefined</State>
  1925.                 <Time>0001-01-01T00:00:00</Time>
  1926.               </RightItem>
  1927.             </WizardCondition>
  1928.           </Conditions>
  1929.           <IsGroup>false</IsGroup>
  1930.           <DisplayName>Default input[0] &gt;= (Position.AveragePrice + (10 * TickSize)) </DisplayName>
  1931.         </WizardConditionGroup>
  1932.         <WizardConditionGroup>
  1933.           <AnyOrAll>Any</AnyOrAll>
  1934.           <Conditions>
  1935.             <WizardCondition>
  1936.               <LeftItem xsi:type="WizardConditionItem">
  1937.                 <IsExpanded>false</IsExpanded>
  1938.                 <IsSelected>true</IsSelected>
  1939.                 <Name>StopLossMode</Name>
  1940.                 <OffsetType>Arithmetic</OffsetType>
  1941.                 <AssignedCommand>
  1942.                   <Command>StopLossMode</Command>
  1943.                   <Parameters />
  1944.                 </AssignedCommand>
  1945.                 <BarsAgo>0</BarsAgo>
  1946.                 <CurrencyType>Currency</CurrencyType>
  1947.                 <Date>2019-10-28T11:06:04.1152269</Date>
  1948.                 <DayOfWeek>Sunday</DayOfWeek>
  1949.                 <EndBar>0</EndBar>
  1950.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1951.                 <LookBackPeriod>0</LookBackPeriod>
  1952.                 <MarketPosition>Long</MarketPosition>
  1953.                 <Period>0</Period>
  1954.                 <ReturnType>Number</ReturnType>
  1955.                 <StartBar>0</StartBar>
  1956.                 <State>Undefined</State>
  1957.                 <Time>0001-01-01T00:00:00</Time>
  1958.               </LeftItem>
  1959.               <Lookback>1</Lookback>
  1960.               <Operator>Equals</Operator>
  1961.               <RightItem xsi:type="WizardConditionItem">
  1962.                 <IsExpanded>false</IsExpanded>
  1963.                 <IsSelected>true</IsSelected>
  1964.                 <Name>Numeric value</Name>
  1965.                 <OffsetType>Arithmetic</OffsetType>
  1966.                 <AssignedCommand>
  1967.                   <Command>{0}</Command>
  1968.                   <Parameters>
  1969.                     <string>NumericValue</string>
  1970.                   </Parameters>
  1971.                 </AssignedCommand>
  1972.                 <BarsAgo>0</BarsAgo>
  1973.                 <CurrencyType>Currency</CurrencyType>
  1974.                 <Date>2019-10-28T11:06:04.1192114</Date>
  1975.                 <DayOfWeek>Sunday</DayOfWeek>
  1976.                 <EndBar>0</EndBar>
  1977.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  1978.                 <LookBackPeriod>0</LookBackPeriod>
  1979.                 <MarketPosition>Long</MarketPosition>
  1980.                 <Period>0</Period>
  1981.                 <ReturnType>Number</ReturnType>
  1982.                 <StartBar>0</StartBar>
  1983.                 <State>Undefined</State>
  1984.                 <Time>0001-01-01T00:00:00</Time>
  1985.               </RightItem>
  1986.             </WizardCondition>
  1987.           </Conditions>
  1988.           <IsGroup>false</IsGroup>
  1989.           <DisplayName>StopLossMode = 0</DisplayName>
  1990.         </WizardConditionGroup>
  1991.       </Conditions>
  1992.       <SetName>Set 5</SetName>
  1993.       <SetNumber>5</SetNumber>
  1994.     </ConditionalAction>
  1995.     <ConditionalAction>
  1996.       <Actions>
  1997.         <WizardAction>
  1998.           <Children />
  1999.           <IsExpanded>true</IsExpanded>
  2000.           <IsSelected>true</IsSelected>
  2001.           <Name>Set StopLossMode</Name>
  2002.           <OffsetType>Arithmetic</OffsetType>
  2003.           <ActionProperties>
  2004.             <DashStyle>Solid</DashStyle>
  2005.             <DivideTimePrice>false</DivideTimePrice>
  2006.             <Id />
  2007.             <File />
  2008.             <IsAutoScale>false</IsAutoScale>
  2009.             <IsSimulatedStop>false</IsSimulatedStop>
  2010.             <IsStop>false</IsStop>
  2011.             <LogLevel>Information</LogLevel>
  2012.             <Mode>Currency</Mode>
  2013.             <OffsetType>Currency</OffsetType>
  2014.             <Priority>Medium</Priority>
  2015.             <Quantity>
  2016.               <DefaultValue>0</DefaultValue>
  2017.               <IsInt>true</IsInt>
  2018.               <DynamicValue>
  2019.                 <Children />
  2020.                 <IsExpanded>false</IsExpanded>
  2021.                 <IsSelected>false</IsSelected>
  2022.                 <Name>Default order quantity</Name>
  2023.                 <OffsetType>Arithmetic</OffsetType>
  2024.                 <AssignedCommand>
  2025.                   <Command>DefaultQuantity</Command>
  2026.                   <Parameters />
  2027.                 </AssignedCommand>
  2028.                 <BarsAgo>0</BarsAgo>
  2029.                 <CurrencyType>Currency</CurrencyType>
  2030.                 <Date>2019-10-14T14:35:59.0527402</Date>
  2031.                 <DayOfWeek>Sunday</DayOfWeek>
  2032.                 <EndBar>0</EndBar>
  2033.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2034.                 <LookBackPeriod>0</LookBackPeriod>
  2035.                 <MarketPosition>Long</MarketPosition>
  2036.                 <Period>0</Period>
  2037.                 <ReturnType>Number</ReturnType>
  2038.                 <StartBar>0</StartBar>
  2039.                 <State>Undefined</State>
  2040.                 <Time>0001-01-01T00:00:00</Time>
  2041.               </DynamicValue>
  2042.               <IsLiteral>false</IsLiteral>
  2043.               <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
  2044.             </Quantity>
  2045.             <ServiceName />
  2046.             <ScreenshotPath />
  2047.             <SoundLocation />
  2048.             <TextPosition>BottomLeft</TextPosition>
  2049.             <VariableInt>
  2050.               <DefaultValue>0</DefaultValue>
  2051.               <IsInt>true</IsInt>
  2052.               <IsLiteral>true</IsLiteral>
  2053.               <LiveValue xsi:type="xsd:string">2</LiveValue>
  2054.             </VariableInt>
  2055.             <VariableDateTime>2019-10-14T14:35:59.0527402</VariableDateTime>
  2056.             <VariableBool>false</VariableBool>
  2057.           </ActionProperties>
  2058.           <ActionType>SetValue</ActionType>
  2059.           <UserVariableType>int</UserVariableType>
  2060.           <VariableName>StopLossMode</VariableName>
  2061.         </WizardAction>
  2062.       </Actions>
  2063.       <AnyOrAll>All</AnyOrAll>
  2064.       <Conditions>
  2065.         <WizardConditionGroup>
  2066.           <AnyOrAll>Any</AnyOrAll>
  2067.           <Conditions>
  2068.             <WizardCondition>
  2069.               <LeftItem xsi:type="WizardConditionItem">
  2070.                 <Children />
  2071.                 <IsExpanded>false</IsExpanded>
  2072.                 <IsSelected>true</IsSelected>
  2073.                 <Name>Current market position</Name>
  2074.                 <OffsetType>Arithmetic</OffsetType>
  2075.                 <AssignedCommand>
  2076.                   <Command>Position.MarketPosition</Command>
  2077.                   <Parameters />
  2078.                 </AssignedCommand>
  2079.                 <BarsAgo>0</BarsAgo>
  2080.                 <CurrencyType>Currency</CurrencyType>
  2081.                 <Date>2019-10-14T14:35:07.0718735</Date>
  2082.                 <DayOfWeek>Sunday</DayOfWeek>
  2083.                 <EndBar>0</EndBar>
  2084.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2085.                 <LookBackPeriod>0</LookBackPeriod>
  2086.                 <MarketPosition>Long</MarketPosition>
  2087.                 <Period>0</Period>
  2088.                 <ReturnType>MarketData</ReturnType>
  2089.                 <StartBar>0</StartBar>
  2090.                 <State>Undefined</State>
  2091.                 <Time>0001-01-01T00:00:00</Time>
  2092.               </LeftItem>
  2093.               <Lookback>1</Lookback>
  2094.               <Operator>Equals</Operator>
  2095.               <RightItem xsi:type="WizardConditionItem">
  2096.                 <Children />
  2097.                 <IsExpanded>false</IsExpanded>
  2098.                 <IsSelected>true</IsSelected>
  2099.                 <Name>Market position</Name>
  2100.                 <OffsetType>Arithmetic</OffsetType>
  2101.                 <AssignedCommand>
  2102.                   <Command>MarketPosition.{0}</Command>
  2103.                   <Parameters>
  2104.                     <string>MarketPosition</string>
  2105.                   </Parameters>
  2106.                 </AssignedCommand>
  2107.                 <BarsAgo>0</BarsAgo>
  2108.                 <CurrencyType>Currency</CurrencyType>
  2109.                 <Date>2019-10-14T14:35:07.0848666</Date>
  2110.                 <DayOfWeek>Sunday</DayOfWeek>
  2111.                 <EndBar>0</EndBar>
  2112.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2113.                 <LookBackPeriod>0</LookBackPeriod>
  2114.                 <MarketPosition>Long</MarketPosition>
  2115.                 <Period>0</Period>
  2116.                 <ReturnType>MarketData</ReturnType>
  2117.                 <StartBar>0</StartBar>
  2118.                 <State>Undefined</State>
  2119.                 <Time>0001-01-01T00:00:00</Time>
  2120.               </RightItem>
  2121.             </WizardCondition>
  2122.           </Conditions>
  2123.           <IsGroup>false</IsGroup>
  2124.           <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
  2125.         </WizardConditionGroup>
  2126.         <WizardConditionGroup>
  2127.           <AnyOrAll>Any</AnyOrAll>
  2128.           <Conditions>
  2129.             <WizardCondition>
  2130.               <LeftItem xsi:type="WizardConditionItem">
  2131.                 <Children />
  2132.                 <IsExpanded>true</IsExpanded>
  2133.                 <IsSelected>true</IsSelected>
  2134.                 <Name>Close</Name>
  2135.                 <OffsetType>Arithmetic</OffsetType>
  2136.                 <AssignedCommand>
  2137.                   <Command>{0}</Command>
  2138.                   <Parameters>
  2139.                     <string>Series1</string>
  2140.                     <string>BarsAgo</string>
  2141.                     <string>OffsetBuilder</string>
  2142.                   </Parameters>
  2143.                 </AssignedCommand>
  2144.                 <BarsAgo>0</BarsAgo>
  2145.                 <CurrencyType>Currency</CurrencyType>
  2146.                 <Date>2019-10-14T14:35:33.1717171</Date>
  2147.                 <DayOfWeek>Sunday</DayOfWeek>
  2148.                 <EndBar>0</EndBar>
  2149.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2150.                 <LookBackPeriod>0</LookBackPeriod>
  2151.                 <MarketPosition>Long</MarketPosition>
  2152.                 <Period>0</Period>
  2153.                 <ReturnType>Series</ReturnType>
  2154.                 <StartBar>0</StartBar>
  2155.                 <State>Undefined</State>
  2156.                 <Time>0001-01-01T00:00:00</Time>
  2157.               </LeftItem>
  2158.               <Lookback>1</Lookback>
  2159.               <Operator>GreaterEqual</Operator>
  2160.               <RightItem xsi:type="WizardConditionItem">
  2161.                 <Children />
  2162.                 <IsExpanded>true</IsExpanded>
  2163.                 <IsSelected>true</IsSelected>
  2164.                 <Name>Average position price</Name>
  2165.                 <OffsetType>Arithmetic</OffsetType>
  2166.                 <AssignedCommand>
  2167.                   <Command>Position.AveragePrice</Command>
  2168.                   <Parameters>
  2169.                     <string>OffsetBuilder</string>
  2170.                   </Parameters>
  2171.                 </AssignedCommand>
  2172.                 <BarsAgo>0</BarsAgo>
  2173.                 <CurrencyType>Currency</CurrencyType>
  2174.                 <Date>2019-10-14T14:35:33.1757104</Date>
  2175.                 <DayOfWeek>Sunday</DayOfWeek>
  2176.                 <EndBar>0</EndBar>
  2177.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2178.                 <LookBackPeriod>0</LookBackPeriod>
  2179.                 <MarketPosition>Long</MarketPosition>
  2180.                 <OffsetBuilder>
  2181.                   <ConditionOffset>
  2182.                     <IsSetEnabled>false</IsSetEnabled>
  2183.                     <OffsetValue>0</OffsetValue>
  2184.                     <OffsetOperator>Add</OffsetOperator>
  2185.                     <OffsetType>Ticks</OffsetType>
  2186.                   </ConditionOffset>
  2187.                   <Offset>
  2188.                     <DefaultValue>0</DefaultValue>
  2189.                     <IsInt>false</IsInt>
  2190.                     <IsLiteral>true</IsLiteral>
  2191.                     <LiveValue xsi:type="xsd:string">20</LiveValue>
  2192.                   </Offset>
  2193.                 </OffsetBuilder>
  2194.                 <Period>0</Period>
  2195.                 <ReturnType>Number</ReturnType>
  2196.                 <StartBar>0</StartBar>
  2197.                 <State>Undefined</State>
  2198.                 <Time>0001-01-01T00:00:00</Time>
  2199.               </RightItem>
  2200.             </WizardCondition>
  2201.           </Conditions>
  2202.           <IsGroup>false</IsGroup>
  2203.           <DisplayName>Default input[0] &gt;= (Position.AveragePrice + (20 * TickSize)) </DisplayName>
  2204.         </WizardConditionGroup>
  2205.         <WizardConditionGroup>
  2206.           <AnyOrAll>Any</AnyOrAll>
  2207.           <Conditions>
  2208.             <WizardCondition>
  2209.               <LeftItem xsi:type="WizardConditionItem">
  2210.                 <IsExpanded>false</IsExpanded>
  2211.                 <IsSelected>true</IsSelected>
  2212.                 <Name>StopLossMode</Name>
  2213.                 <OffsetType>Arithmetic</OffsetType>
  2214.                 <AssignedCommand>
  2215.                   <Command>StopLossMode</Command>
  2216.                   <Parameters />
  2217.                 </AssignedCommand>
  2218.                 <BarsAgo>0</BarsAgo>
  2219.                 <CurrencyType>Currency</CurrencyType>
  2220.                 <Date>2019-10-28T11:06:17.7446488</Date>
  2221.                 <DayOfWeek>Sunday</DayOfWeek>
  2222.                 <EndBar>0</EndBar>
  2223.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2224.                 <LookBackPeriod>0</LookBackPeriod>
  2225.                 <MarketPosition>Long</MarketPosition>
  2226.                 <Period>0</Period>
  2227.                 <ReturnType>Number</ReturnType>
  2228.                 <StartBar>0</StartBar>
  2229.                 <State>Undefined</State>
  2230.                 <Time>0001-01-01T00:00:00</Time>
  2231.               </LeftItem>
  2232.               <Lookback>1</Lookback>
  2233.               <Operator>Equals</Operator>
  2234.               <RightItem xsi:type="WizardConditionItem">
  2235.                 <IsExpanded>false</IsExpanded>
  2236.                 <IsSelected>true</IsSelected>
  2237.                 <Name>Numeric value</Name>
  2238.                 <OffsetType>Arithmetic</OffsetType>
  2239.                 <AssignedCommand>
  2240.                   <Command>{0}</Command>
  2241.                   <Parameters>
  2242.                     <string>NumericValue</string>
  2243.                   </Parameters>
  2244.                 </AssignedCommand>
  2245.                 <BarsAgo>0</BarsAgo>
  2246.                 <CurrencyType>Currency</CurrencyType>
  2247.                 <Date>2019-10-28T11:06:17.7486428</Date>
  2248.                 <DayOfWeek>Sunday</DayOfWeek>
  2249.                 <EndBar>0</EndBar>
  2250.                 <ForceSeriesIndex>false</ForceSeriesIndex>
  2251.                 <LookBackPeriod>0</LookBackPeriod>
  2252.                 <MarketPosition>Long</MarketPosition>
  2253.                 <NumericValue>
  2254.                   <DefaultValue>0</DefaultValue>
  2255.                   <IsInt>false</IsInt>
  2256.                   <IsLiteral>true</IsLiteral>
  2257.                   <LiveValue xsi:type="xsd:string">1</LiveValue>
  2258.                 </NumericValue>
  2259.                 <Period>0</Period>
  2260.                 <ReturnType>Number</ReturnType>
  2261.                 <StartBar>0</StartBar>
  2262.                 <State>Undefined</State>
  2263.                 <Time>0001-01-01T00:00:00</Time>
  2264.               </RightItem>
  2265.             </WizardCondition>
  2266.           </Conditions>
  2267.           <IsGroup>false</IsGroup>
  2268.           <DisplayName>StopLossMode = 1</DisplayName>
  2269.         </WizardConditionGroup>
  2270.       </Conditions>
  2271.       <SetName>Set 6</SetName>
  2272.       <SetNumber>6</SetNumber>
  2273.     </ConditionalAction>
  2274.   </ConditionalActions>
  2275.   <CustomSeries />
  2276.   <DataSeries />
  2277.   <Description>Enter the description for your new custom Strategy here.</Description>
  2278.   <DisplayInDataBox>true</DisplayInDataBox>
  2279.   <DrawHorizontalGridLines>true</DrawHorizontalGridLines>
  2280.   <DrawOnPricePanel>true</DrawOnPricePanel>
  2281.   <DrawVerticalGridLines>true</DrawVerticalGridLines>
  2282.   <EntriesPerDirection>1</EntriesPerDirection>
  2283.   <EntryHandling>AllEntries</EntryHandling>
  2284.   <ExitOnSessionClose>true</ExitOnSessionClose>
  2285.   <ExitOnSessionCloseSeconds>30</ExitOnSessionCloseSeconds>
  2286.   <FillLimitOrdersOnTouch>false</FillLimitOrdersOnTouch>
  2287.   <InputParameters />
  2288.   <IsTradingHoursBreakLineVisible>true</IsTradingHoursBreakLineVisible>
  2289.   <IsInstantiatedOnEachOptimizationIteration>true</IsInstantiatedOnEachOptimizationIteration>
  2290.   <MaximumBarsLookBack>TwoHundredFiftySix</MaximumBarsLookBack>
  2291.   <MinimumBarsRequired>20</MinimumBarsRequired>
  2292.   <OrderFillResolution>Standard</OrderFillResolution>
  2293.   <OrderFillResolutionValue>1</OrderFillResolutionValue>
  2294.   <OrderFillResolutionType>Minute</OrderFillResolutionType>
  2295.   <OverlayOnPrice>false</OverlayOnPrice>
  2296.   <PaintPriceMarkers>true</PaintPriceMarkers>
  2297.   <PlotParameters />
  2298.   <RealTimeErrorHandling>StopCancelClose</RealTimeErrorHandling>
  2299.   <ScaleJustification>Right</ScaleJustification>
  2300.   <ScriptType>Strategy</ScriptType>
  2301.   <Slippage>0</Slippage>
  2302.   <StartBehavior>WaitUntilFlat</StartBehavior>
  2303.   <StopsAndTargets />
  2304.   <StopTargetHandling>PerEntryExecution</StopTargetHandling>
  2305.   <TimeInForce>Gtc</TimeInForce>
  2306.   <TraceOrders>false</TraceOrders>
  2307.   <UseOnAddTradeEvent>false</UseOnAddTradeEvent>
  2308.   <UseOnAuthorizeAccountEvent>false</UseOnAuthorizeAccountEvent>
  2309.   <UseAccountItemUpdate>false</UseAccountItemUpdate>
  2310.   <UseOnCalculatePerformanceValuesEvent>true</UseOnCalculatePerformanceValuesEvent>
  2311.   <UseOnConnectionEvent>false</UseOnConnectionEvent>
  2312.   <UseOnDataPointEvent>true</UseOnDataPointEvent>
  2313.   <UseOnFundamentalDataEvent>false</UseOnFundamentalDataEvent>
  2314.   <UseOnExecutionEvent>false</UseOnExecutionEvent>
  2315.   <UseOnMouseDown>true</UseOnMouseDown>
  2316.   <UseOnMouseMove>true</UseOnMouseMove>
  2317.   <UseOnMouseUp>true</UseOnMouseUp>
  2318.   <UseOnMarketDataEvent>false</UseOnMarketDataEvent>
  2319.   <UseOnMarketDepthEvent>false</UseOnMarketDepthEvent>
  2320.   <UseOnMergePerformanceMetricEvent>false</UseOnMergePerformanceMetricEvent>
  2321.   <UseOnNextDataPointEvent>true</UseOnNextDataPointEvent>
  2322.   <UseOnNextInstrumentEvent>true</UseOnNextInstrumentEvent>
  2323.   <UseOnOptimizeEvent>true</UseOnOptimizeEvent>
  2324.   <UseOnOrderUpdateEvent>false</UseOnOrderUpdateEvent>
  2325.   <UseOnPositionUpdateEvent>false</UseOnPositionUpdateEvent>
  2326.   <UseOnRenderEvent>true</UseOnRenderEvent>
  2327.   <UseOnRestoreValuesEvent>false</UseOnRestoreValuesEvent>
  2328.   <UseOnShareEvent>true</UseOnShareEvent>
  2329.   <UseOnWindowCreatedEvent>false</UseOnWindowCreatedEvent>
  2330.   <UseOnWindowDestroyedEvent>false</UseOnWindowDestroyedEvent>
  2331.   <Variables>
  2332.     <InputParameter>
  2333.       <Default>0</Default>
  2334.       <Name>StopLossMode</Name>
  2335.       <Type>int</Type>
  2336.     </InputParameter>
  2337.   </Variables>
  2338.   <Name>MultiStepBreakeven</Name>
  2339. </ScriptProperties>
  2340. @*/
  2341. #endregion
  2342.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement