Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Using declarations
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Xml.Serialization;
- using NinjaTrader.Cbi;
- using NinjaTrader.Gui;
- using NinjaTrader.Gui.Chart;
- using NinjaTrader.Gui.SuperDom;
- using NinjaTrader.Gui.Tools;
- using NinjaTrader.Data;
- using NinjaTrader.NinjaScript;
- using NinjaTrader.Core.FloatingPoint;
- using NinjaTrader.NinjaScript.Indicators;
- using NinjaTrader.NinjaScript.DrawingTools;
- #endregion
- //This namespace holds Strategies in this folder and is required. Do not change it.
- namespace NinjaTrader.NinjaScript.Strategies
- {
- public class MultiStepBreakeven : Strategy
- {
- private int StopLossMode;
- protected override void OnStateChange()
- {
- if (State == State.SetDefaults)
- {
- Description = @"Enter the description for your new custom Strategy here.";
- Name = "MultiStepBreakeven";
- Calculate = Calculate.OnBarClose;
- EntriesPerDirection = 1;
- EntryHandling = EntryHandling.AllEntries;
- IsExitOnSessionCloseStrategy = true;
- ExitOnSessionCloseSeconds = 30;
- IsFillLimitOnTouch = false;
- MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
- OrderFillResolution = OrderFillResolution.Standard;
- Slippage = 0;
- StartBehavior = StartBehavior.WaitUntilFlat;
- TimeInForce = TimeInForce.Gtc;
- TraceOrders = false;
- RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
- StopTargetHandling = StopTargetHandling.PerEntryExecution;
- BarsRequiredToTrade = 20;
- // Disable this property for performance gains in Strategy Analyzer optimizations
- // See the Help Guide for additional information
- IsInstantiatedOnEachOptimizationIteration = true;
- StopLossMode = 0;
- }
- else if (State == State.Configure)
- {
- }
- }
- protected override void OnBarUpdate()
- {
- if (BarsInProgress != 0)
- return;
- if (CurrentBars[0] < 2)
- return;
- //LONG ORDERS
- // Set 1
- if ((Position.MarketPosition == MarketPosition.Flat)
- && (High[0] > High[1])
- && (High[1] > High[2])
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0))
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0)))
- {
- EnterLongLimit(Convert.ToInt32(DefaultQuantity), 0, "");
- StopLossMode = 0;
- }
- // Set 2
- if ((Position.MarketPosition == MarketPosition.Long)
- && (StopLossMode == 0)
- && (High[1] > High[2])
- && (High[0] > High[1])
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- ExitLongStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (-10 * TickSize)) , "", "");
- }
- // Set 3
- if ((Position.MarketPosition == MarketPosition.Long)
- && (StopLossMode == 1)
- && (High[1] > High[2])
- && (High[0] > High[1])
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- ExitLongStopMarket(Convert.ToInt32(DefaultQuantity), Position.AveragePrice, "", "");
- }
- // Set 4
- if ((Position.MarketPosition == MarketPosition.Long)
- && (StopLossMode == 2)
- && (High[1] > High[2])
- && (High[0] > High[1])
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- ExitLongStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (10 * TickSize)) , "", "");
- }
- // Set 5
- if ((Position.MarketPosition == MarketPosition.Long)
- && (StopLossMode == 0)
- && (Close[0] >= (Position.AveragePrice + (10 * TickSize)) )
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- StopLossMode = 1;
- }
- // Set 6
- if ((Position.MarketPosition == MarketPosition.Long)
- && (StopLossMode == 1)
- && (Close[0] >= (Position.AveragePrice + (20 * TickSize)) )
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- StopLossMode = 2;
- }
- //SHORT ORDERS
- // Set 7
- if ((Position.MarketPosition == MarketPosition.Flat)
- && (Low[0] < Low[1])
- && (Low[1] < Low[2])
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0))
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0)))
- {
- EnterShortLimit(Convert.ToInt32(DefaultQuantity), 0, "");
- StopLossMode = 0;
- }
- // Set 8
- if ((Position.MarketPosition == MarketPosition.Short)
- && (StopLossMode == 0)
- && (Low[0] < Low[1])
- && (Low[1] < Low[2])
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- ExitShortStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (10 * TickSize)) , "", "");
- }
- // Set 9
- if ((Position.MarketPosition == MarketPosition.Short)
- && (StopLossMode == 1)
- && (Low[0] < Low[1])
- && (Low[1] < Low[2])
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- ExitShortStopMarket(Convert.ToInt32(DefaultQuantity), Position.AveragePrice, "", "");
- }
- // Set 10
- if ((Position.MarketPosition == MarketPosition.Short)
- && (StopLossMode == 2)
- && (Low[0] < Low[1])
- && (Low[1] < Low[2])
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- ExitShortStopMarket(Convert.ToInt32(DefaultQuantity), (Position.AveragePrice + (-10 * TickSize)) , "", "");
- }
- // Set 11
- if ((Position.MarketPosition == MarketPosition.Short)
- && (StopLossMode == 0)
- && (Close[0] >= (Position.AveragePrice + (-10 * TickSize)) )
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- StopLossMode = 1;
- }
- // Set 12
- if ((Position.MarketPosition == MarketPosition.Short)
- && (StopLossMode == 1)
- && (Close[0] >= (Position.AveragePrice + (-20 * TickSize)) )
- && (Times[0][0].TimeOfDay <= new TimeSpan(11, 50, 0))
- && (Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)))
- {
- StopLossMode = 2;
- }
- }
- }
- }
- #region Wizard settings, neither change nor remove
- /*@
- <?xml version="1.0"?>
- <ScriptProperties xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Calculate>OnBarClose</Calculate>
- <ConditionalActions>
- <ConditionalAction>
- <Actions>
- <WizardAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Enter long position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:13:53.354334</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Enter long position</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-06-13T07:13:53.354334</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>Enter</ActionType>
- <Command>
- <Command>EnterLong</Command>
- <Parameters>
- <string>quantity</string>
- <string>signalName</string>
- </Parameters>
- </Command>
- </WizardAction>
- <WizardAction>
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Set StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:31:29.3557158</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:31:29.3557158</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>SetValue</ActionType>
- <UserVariableType>int</UserVariableType>
- <VariableName>StopLossMode</VariableName>
- </WizardAction>
- </Actions>
- <ActiveAction>
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Set StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:31:29.3557158</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:31:29.3557158</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>SetValue</ActionType>
- <UserVariableType>int</UserVariableType>
- <VariableName>StopLossMode</VariableName>
- </ActiveAction>
- <AnyOrAll>All</AnyOrAll>
- <Conditions>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Current market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.MarketPosition</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:13:17.5006667</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>MarketPosition.{0}</Command>
- <Parameters>
- <string>MarketPosition</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:13:17.5116603</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Flat</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Position.MarketPosition = MarketPosition.Flat</DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Close</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>Series1</string>
- <string>BarsAgo</string>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:13:41.4822233</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Series</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Greater</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Open</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>Series1</string>
- <string>BarsAgo</string>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:13:41.487219</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Series</ReturnType>
- <Series1>
- <AcceptableSeries>DataSeries DefaultSeries</AcceptableSeries>
- <CustomProperties />
- <IsExplicitlyNamed>false</IsExplicitlyNamed>
- <IsPriceTypeLocked>true</IsPriceTypeLocked>
- <PlotOnChart>false</PlotOnChart>
- <PriceType>Open</PriceType>
- <SeriesType>DefaultSeries</SeriesType>
- </Series1>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Default input[0] > Open[0]</DisplayName>
- </WizardConditionGroup>
- </Conditions>
- <SetName>Set 1</SetName>
- <SetNumber>1</SetNumber>
- </ConditionalAction>
- <ConditionalAction>
- <Actions>
- <WizardAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Exit long position by a stop order</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:39:33.0875786</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <StopPrice>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:39:41.5932176</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <OffsetBuilder>
- <ConditionOffset>
- <IsSetEnabled>false</IsSetEnabled>
- <OffsetValue>0</OffsetValue>
- <OffsetOperator>Add</OffsetOperator>
- <OffsetType>Ticks</OffsetType>
- </ConditionOffset>
- <Offset>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">-10</LiveValue>
- </Offset>
- </OffsetBuilder>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (-10 * TickSize)) </LiveValue>
- </StopPrice>
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Exit long position by a stop order</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:39:33.0875786</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>ExitStop</ActionType>
- <Command>
- <Command>ExitLongStopMarket</Command>
- <Parameters>
- <string>quantity</string>
- <string>stopPrice</string>
- <string>signalName</string>
- <string>fromEntrySignal</string>
- </Parameters>
- </Command>
- </WizardAction>
- </Actions>
- <ActiveAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Exit long position by a stop order</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:39:33.0875786</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <StopPrice>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:39:41.5932176</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <OffsetBuilder>
- <ConditionOffset>
- <IsSetEnabled>false</IsSetEnabled>
- <OffsetValue>0</OffsetValue>
- <OffsetOperator>Add</OffsetOperator>
- <OffsetType>Ticks</OffsetType>
- </ConditionOffset>
- <Offset>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">-10</LiveValue>
- </Offset>
- </OffsetBuilder>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (-10 * TickSize)) </LiveValue>
- </StopPrice>
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Exit long position by a stop order</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:39:33.0875786</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>ExitStop</ActionType>
- <Command>
- <Command>ExitLongStopMarket</Command>
- <Parameters>
- <string>quantity</string>
- <string>stopPrice</string>
- <string>signalName</string>
- <string>fromEntrySignal</string>
- </Parameters>
- </Command>
- </ActiveAction>
- <AnyOrAll>All</AnyOrAll>
- <Conditions>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Current market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.MarketPosition</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:14:19.3450078</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>MarketPosition.{0}</Command>
- <Parameters>
- <string>MarketPosition</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:14:19.3509917</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>StopLossMode</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:33:48.9142075</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Numeric value</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>NumericValue</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:33:48.9262012</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>StopLossMode = 0</DisplayName>
- </WizardConditionGroup>
- </Conditions>
- <SetName>Set 2</SetName>
- <SetNumber>2</SetNumber>
- </ConditionalAction>
- <ConditionalAction>
- <Actions>
- <WizardAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Exit long position by a stop order</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:06.4905993</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <StopPrice>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:11.4473357</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">Position.AveragePrice</LiveValue>
- </StopPrice>
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Exit long position by a stop order</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:40:06.4905993</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>ExitStop</ActionType>
- <Command>
- <Command>ExitLongStopMarket</Command>
- <Parameters>
- <string>quantity</string>
- <string>stopPrice</string>
- <string>signalName</string>
- <string>fromEntrySignal</string>
- </Parameters>
- </Command>
- </WizardAction>
- </Actions>
- <ActiveAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Exit long position by a stop order</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:06.4905993</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <StopPrice>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:11.4473357</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">Position.AveragePrice</LiveValue>
- </StopPrice>
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Exit long position by a stop order</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:40:06.4905993</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>ExitStop</ActionType>
- <Command>
- <Command>ExitLongStopMarket</Command>
- <Parameters>
- <string>quantity</string>
- <string>stopPrice</string>
- <string>signalName</string>
- <string>fromEntrySignal</string>
- </Parameters>
- </Command>
- </ActiveAction>
- <AnyOrAll>All</AnyOrAll>
- <Conditions>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Current market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.MarketPosition</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:14:19.3450078</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>MarketPosition.{0}</Command>
- <Parameters>
- <string>MarketPosition</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:14:19.3509917</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>StopLossMode</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:32:06.718673</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Numeric value</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>NumericValue</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:32:06.7226707</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <NumericValue>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">1</LiveValue>
- </NumericValue>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>StopLossMode = 1</DisplayName>
- </WizardConditionGroup>
- </Conditions>
- <SetName>Set 3</SetName>
- <SetNumber>3</SetNumber>
- </ConditionalAction>
- <ConditionalAction>
- <Actions>
- <WizardAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Exit long position by a stop order</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:37.9509102</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <StopPrice>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:44.2174824</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <OffsetBuilder>
- <ConditionOffset>
- <IsSetEnabled>false</IsSetEnabled>
- <OffsetValue>0</OffsetValue>
- <OffsetOperator>Add</OffsetOperator>
- <OffsetType>Ticks</OffsetType>
- </ConditionOffset>
- <Offset>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">10</LiveValue>
- </Offset>
- </OffsetBuilder>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (10 * TickSize)) </LiveValue>
- </StopPrice>
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Exit long position by a stop order</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:40:37.9509102</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>ExitStop</ActionType>
- <Command>
- <Command>ExitLongStopMarket</Command>
- <Parameters>
- <string>quantity</string>
- <string>stopPrice</string>
- <string>signalName</string>
- <string>fromEntrySignal</string>
- </Parameters>
- </Command>
- </WizardAction>
- </Actions>
- <ActiveAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Exit long position by a stop order</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:37.9509102</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <StopPrice>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:40:44.2174824</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <OffsetBuilder>
- <ConditionOffset>
- <IsSetEnabled>false</IsSetEnabled>
- <OffsetValue>0</OffsetValue>
- <OffsetOperator>Add</OffsetOperator>
- <OffsetType>Ticks</OffsetType>
- </ConditionOffset>
- <Offset>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">10</LiveValue>
- </Offset>
- </OffsetBuilder>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">(Position.AveragePrice + (10 * TickSize)) </LiveValue>
- </StopPrice>
- <Tag>
- <SeparatorCharacter> </SeparatorCharacter>
- <Strings>
- <NinjaScriptString>
- <Index>0</Index>
- <StringValue>Set Exit long position by a stop order</StringValue>
- </NinjaScriptString>
- </Strings>
- </Tag>
- <TextPosition>BottomLeft</TextPosition>
- <VariableDateTime>2019-10-14T14:40:37.9509102</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>ExitStop</ActionType>
- <Command>
- <Command>ExitLongStopMarket</Command>
- <Parameters>
- <string>quantity</string>
- <string>stopPrice</string>
- <string>signalName</string>
- <string>fromEntrySignal</string>
- </Parameters>
- </Command>
- </ActiveAction>
- <AnyOrAll>All</AnyOrAll>
- <Conditions>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Current market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.MarketPosition</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:14:19.3450078</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>MarketPosition.{0}</Command>
- <Parameters>
- <string>MarketPosition</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-06-13T07:14:19.3509917</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>StopLossMode</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:32:27.971715</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Numeric value</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>NumericValue</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:32:27.976712</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <NumericValue>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">2</LiveValue>
- </NumericValue>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>StopLossMode = 2</DisplayName>
- </WizardConditionGroup>
- </Conditions>
- <SetName>Set 4</SetName>
- <SetNumber>4</SetNumber>
- </ConditionalAction>
- <ConditionalAction>
- <Actions>
- <WizardAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Set StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:59.0527402</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <TextPosition>BottomLeft</TextPosition>
- <VariableInt>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">1</LiveValue>
- </VariableInt>
- <VariableDateTime>2019-10-14T14:35:59.0527402</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>SetValue</ActionType>
- <UserVariableType>int</UserVariableType>
- <VariableName>StopLossMode</VariableName>
- </WizardAction>
- </Actions>
- <ActiveAction>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Set StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:59.0527402</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <TextPosition>BottomLeft</TextPosition>
- <VariableInt>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">1</LiveValue>
- </VariableInt>
- <VariableDateTime>2019-10-14T14:35:59.0527402</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>SetValue</ActionType>
- <UserVariableType>int</UserVariableType>
- <VariableName>StopLossMode</VariableName>
- </ActiveAction>
- <AnyOrAll>All</AnyOrAll>
- <Conditions>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Current market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.MarketPosition</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:07.0718735</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>MarketPosition.{0}</Command>
- <Parameters>
- <string>MarketPosition</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:07.0848666</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Close</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>Series1</string>
- <string>BarsAgo</string>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:33.1717171</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Series</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>GreaterEqual</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:33.1757104</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <OffsetBuilder>
- <ConditionOffset>
- <IsSetEnabled>false</IsSetEnabled>
- <OffsetValue>0</OffsetValue>
- <OffsetOperator>Add</OffsetOperator>
- <OffsetType>Ticks</OffsetType>
- </ConditionOffset>
- <Offset>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">10</LiveValue>
- </Offset>
- </OffsetBuilder>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Default input[0] >= (Position.AveragePrice + (10 * TickSize)) </DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>StopLossMode</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-28T11:06:04.1152269</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Numeric value</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>NumericValue</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-28T11:06:04.1192114</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>StopLossMode = 0</DisplayName>
- </WizardConditionGroup>
- </Conditions>
- <SetName>Set 5</SetName>
- <SetNumber>5</SetNumber>
- </ConditionalAction>
- <ConditionalAction>
- <Actions>
- <WizardAction>
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Set StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <ActionProperties>
- <DashStyle>Solid</DashStyle>
- <DivideTimePrice>false</DivideTimePrice>
- <Id />
- <File />
- <IsAutoScale>false</IsAutoScale>
- <IsSimulatedStop>false</IsSimulatedStop>
- <IsStop>false</IsStop>
- <LogLevel>Information</LogLevel>
- <Mode>Currency</Mode>
- <OffsetType>Currency</OffsetType>
- <Priority>Medium</Priority>
- <Quantity>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <DynamicValue>
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>false</IsSelected>
- <Name>Default order quantity</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>DefaultQuantity</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:59.0527402</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </DynamicValue>
- <IsLiteral>false</IsLiteral>
- <LiveValue xsi:type="xsd:string">DefaultQuantity</LiveValue>
- </Quantity>
- <ServiceName />
- <ScreenshotPath />
- <SoundLocation />
- <TextPosition>BottomLeft</TextPosition>
- <VariableInt>
- <DefaultValue>0</DefaultValue>
- <IsInt>true</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">2</LiveValue>
- </VariableInt>
- <VariableDateTime>2019-10-14T14:35:59.0527402</VariableDateTime>
- <VariableBool>false</VariableBool>
- </ActionProperties>
- <ActionType>SetValue</ActionType>
- <UserVariableType>int</UserVariableType>
- <VariableName>StopLossMode</VariableName>
- </WizardAction>
- </Actions>
- <AnyOrAll>All</AnyOrAll>
- <Conditions>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Current market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.MarketPosition</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:07.0718735</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Market position</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>MarketPosition.{0}</Command>
- <Parameters>
- <string>MarketPosition</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:07.0848666</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>MarketData</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Position.MarketPosition = MarketPosition.Long</DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Close</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>Series1</string>
- <string>BarsAgo</string>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:33.1717171</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Series</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>GreaterEqual</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <Children />
- <IsExpanded>true</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Average position price</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>Position.AveragePrice</Command>
- <Parameters>
- <string>OffsetBuilder</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-14T14:35:33.1757104</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <OffsetBuilder>
- <ConditionOffset>
- <IsSetEnabled>false</IsSetEnabled>
- <OffsetValue>0</OffsetValue>
- <OffsetOperator>Add</OffsetOperator>
- <OffsetType>Ticks</OffsetType>
- </ConditionOffset>
- <Offset>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">20</LiveValue>
- </Offset>
- </OffsetBuilder>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>Default input[0] >= (Position.AveragePrice + (20 * TickSize)) </DisplayName>
- </WizardConditionGroup>
- <WizardConditionGroup>
- <AnyOrAll>Any</AnyOrAll>
- <Conditions>
- <WizardCondition>
- <LeftItem xsi:type="WizardConditionItem">
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>StopLossMode</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>StopLossMode</Command>
- <Parameters />
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-28T11:06:17.7446488</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </LeftItem>
- <Lookback>1</Lookback>
- <Operator>Equals</Operator>
- <RightItem xsi:type="WizardConditionItem">
- <IsExpanded>false</IsExpanded>
- <IsSelected>true</IsSelected>
- <Name>Numeric value</Name>
- <OffsetType>Arithmetic</OffsetType>
- <AssignedCommand>
- <Command>{0}</Command>
- <Parameters>
- <string>NumericValue</string>
- </Parameters>
- </AssignedCommand>
- <BarsAgo>0</BarsAgo>
- <CurrencyType>Currency</CurrencyType>
- <Date>2019-10-28T11:06:17.7486428</Date>
- <DayOfWeek>Sunday</DayOfWeek>
- <EndBar>0</EndBar>
- <ForceSeriesIndex>false</ForceSeriesIndex>
- <LookBackPeriod>0</LookBackPeriod>
- <MarketPosition>Long</MarketPosition>
- <NumericValue>
- <DefaultValue>0</DefaultValue>
- <IsInt>false</IsInt>
- <IsLiteral>true</IsLiteral>
- <LiveValue xsi:type="xsd:string">1</LiveValue>
- </NumericValue>
- <Period>0</Period>
- <ReturnType>Number</ReturnType>
- <StartBar>0</StartBar>
- <State>Undefined</State>
- <Time>0001-01-01T00:00:00</Time>
- </RightItem>
- </WizardCondition>
- </Conditions>
- <IsGroup>false</IsGroup>
- <DisplayName>StopLossMode = 1</DisplayName>
- </WizardConditionGroup>
- </Conditions>
- <SetName>Set 6</SetName>
- <SetNumber>6</SetNumber>
- </ConditionalAction>
- </ConditionalActions>
- <CustomSeries />
- <DataSeries />
- <Description>Enter the description for your new custom Strategy here.</Description>
- <DisplayInDataBox>true</DisplayInDataBox>
- <DrawHorizontalGridLines>true</DrawHorizontalGridLines>
- <DrawOnPricePanel>true</DrawOnPricePanel>
- <DrawVerticalGridLines>true</DrawVerticalGridLines>
- <EntriesPerDirection>1</EntriesPerDirection>
- <EntryHandling>AllEntries</EntryHandling>
- <ExitOnSessionClose>true</ExitOnSessionClose>
- <ExitOnSessionCloseSeconds>30</ExitOnSessionCloseSeconds>
- <FillLimitOrdersOnTouch>false</FillLimitOrdersOnTouch>
- <InputParameters />
- <IsTradingHoursBreakLineVisible>true</IsTradingHoursBreakLineVisible>
- <IsInstantiatedOnEachOptimizationIteration>true</IsInstantiatedOnEachOptimizationIteration>
- <MaximumBarsLookBack>TwoHundredFiftySix</MaximumBarsLookBack>
- <MinimumBarsRequired>20</MinimumBarsRequired>
- <OrderFillResolution>Standard</OrderFillResolution>
- <OrderFillResolutionValue>1</OrderFillResolutionValue>
- <OrderFillResolutionType>Minute</OrderFillResolutionType>
- <OverlayOnPrice>false</OverlayOnPrice>
- <PaintPriceMarkers>true</PaintPriceMarkers>
- <PlotParameters />
- <RealTimeErrorHandling>StopCancelClose</RealTimeErrorHandling>
- <ScaleJustification>Right</ScaleJustification>
- <ScriptType>Strategy</ScriptType>
- <Slippage>0</Slippage>
- <StartBehavior>WaitUntilFlat</StartBehavior>
- <StopsAndTargets />
- <StopTargetHandling>PerEntryExecution</StopTargetHandling>
- <TimeInForce>Gtc</TimeInForce>
- <TraceOrders>false</TraceOrders>
- <UseOnAddTradeEvent>false</UseOnAddTradeEvent>
- <UseOnAuthorizeAccountEvent>false</UseOnAuthorizeAccountEvent>
- <UseAccountItemUpdate>false</UseAccountItemUpdate>
- <UseOnCalculatePerformanceValuesEvent>true</UseOnCalculatePerformanceValuesEvent>
- <UseOnConnectionEvent>false</UseOnConnectionEvent>
- <UseOnDataPointEvent>true</UseOnDataPointEvent>
- <UseOnFundamentalDataEvent>false</UseOnFundamentalDataEvent>
- <UseOnExecutionEvent>false</UseOnExecutionEvent>
- <UseOnMouseDown>true</UseOnMouseDown>
- <UseOnMouseMove>true</UseOnMouseMove>
- <UseOnMouseUp>true</UseOnMouseUp>
- <UseOnMarketDataEvent>false</UseOnMarketDataEvent>
- <UseOnMarketDepthEvent>false</UseOnMarketDepthEvent>
- <UseOnMergePerformanceMetricEvent>false</UseOnMergePerformanceMetricEvent>
- <UseOnNextDataPointEvent>true</UseOnNextDataPointEvent>
- <UseOnNextInstrumentEvent>true</UseOnNextInstrumentEvent>
- <UseOnOptimizeEvent>true</UseOnOptimizeEvent>
- <UseOnOrderUpdateEvent>false</UseOnOrderUpdateEvent>
- <UseOnPositionUpdateEvent>false</UseOnPositionUpdateEvent>
- <UseOnRenderEvent>true</UseOnRenderEvent>
- <UseOnRestoreValuesEvent>false</UseOnRestoreValuesEvent>
- <UseOnShareEvent>true</UseOnShareEvent>
- <UseOnWindowCreatedEvent>false</UseOnWindowCreatedEvent>
- <UseOnWindowDestroyedEvent>false</UseOnWindowDestroyedEvent>
- <Variables>
- <InputParameter>
- <Default>0</Default>
- <Name>StopLossMode</Name>
- <Type>int</Type>
- </InputParameter>
- </Variables>
- <Name>MultiStepBreakeven</Name>
- </ScriptProperties>
- @*/
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement