StrategyBase Methods |
The StrategyBase type exposes the following members.
Name | Description | |
---|---|---|
AddIndicatorT |
Adds and/or retrieves sharp script from the cache
(Inherited from SharpScriptBase.) | |
AddIndicatorT(Object) |
Adds and/or retrieves and sharp script from the cache
(Inherited from SharpScriptBase.) | |
AddIndicatorT(ISeriesDouble) |
Adds and/or retrieves sharp script from the cache
(Inherited from SharpScriptBase.) | |
AddIndicatorT(ISeriesDouble, Object) |
Adds and/or retrieves and sharp script from the cache
(Inherited from SharpScriptBase.) | |
AddLine |
Add a new line
(Inherited from SharpScriptBase.) | |
AddPlot |
Add a new Plot
(Inherited from SharpScriptBase.) | |
Alert(String) |
Sends a new Alert message to the Alert View
(Inherited from SharpScriptBase.) | |
Alert(AlertPriority, String) |
Sends a new Alert message to the Alert View
(Inherited from SharpScriptBase.) | |
Alert(AlertPriority, String, Brush, Brush) |
Sends a new Alert message to the Alert View
(Inherited from SharpScriptBase.) | |
BarsSinceTrade |
Returns the number of bars that have elapsed since the order entry
| |
CalculateMinMax |
Calculates the minimum and maximum values of the axis
(Inherited from SharpScriptBase.) | |
CancelOrder |
Cancels an order
| |
Clone |
Clones a sharpScript object
(Inherited from SharpScriptBase.) | |
ClosePosition |
Cancels all pending orders and closes exiting position.
Market order is submitted to close the position. If Connection does not supports market order then a limit order is submitted.
| |
CrossAbove(Double, ISeriesDouble, Int32) |
Evaluates when value crosses above a series
(Inherited from SharpScriptBase.) | |
CrossAbove(ISeriesDouble, ISeriesDouble, Int32) |
Evaluates when 2 (two) series crosses each other
(Inherited from SharpScriptBase.) | |
CrossAbove(ISeriesDouble, Double, Int32) |
Evaluates when the series crosses above the value
(Inherited from SharpScriptBase.) | |
CrossBelow(Double, ISeriesDouble, Int32) |
Evaluates when a value crosses below a series
(Inherited from SharpScriptBase.) | |
CrossBelow(ISeriesDouble, ISeriesDouble, Int32) |
Evaluates when 2 (two) series crosses below each other
(Inherited from SharpScriptBase.) | |
CrossBelow(ISeriesDouble, Double, Int32) |
Evaluates when series crosses below a value
(Inherited from SharpScriptBase.) | |
Disable |
Disables the strategy.
Pending orders will be canceled or not will be determined via Settings > Options > Strategies tab > CanCancelPendingOrders property.
Position will be closed or not will be determined via Settings > Options > Strategies tab > CanClosePosition property.
| |
EnterLong |
Enters a long position. The entry name is set to the default 'Strategy Entry'
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterLong(Int32) |
Enters a long position. The entry name is set to the default 'Strategy Entry'
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterLong(String) |
Enters a long position
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterLong(String, Int32) |
Enters a long position
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterLongLimit(Double) |
Submits a long limit order. The entry name is set to the default 'Strategy Entry'
| |
EnterLongLimit(String, Double) |
Submits a long limit order
| |
EnterLongLimit(String, Int32, Double) |
Submits a long limit order
| |
EnterShort |
Enters a short position. The entry name is set to the default 'Strategy Entry'
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterShort(Int32) |
Enters a short position. The entry name is set to the default 'Strategy Entry'
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterShort(String) |
Enters a short position
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterShort(String, Int32) |
Enters a short position.
Market order is submitted. If Connection does not supports market order then a limit order is submitted.
| |
EnterShortLimit(Double) |
Submits a short limit order. The entry name is set to the default 'Strategy Entry'
| |
EnterShortLimit(String, Double) |
Submits a short limit order
| |
EnterShortLimit(String, Int32, Double) |
Submits a short limit order
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExitPosition |
Exits positions as entered via entry order with entry name as Strategy Entry (default entry name)
Market order is submitted to close the position. If Connection does not supports market order then a limit order is submitted.
| |
ExitPosition(String) |
Exits a position
| |
Finalize | (Inherited from SharpScriptBase.) | |
GetAskPrice |
Returns the ask price
(Inherited from SharpScriptBase.) | |
GetBidPrice |
Returns the bid price
(Inherited from SharpScriptBase.) | |
GetFrozenBrush |
Returns the brush as frozen
(Inherited from SharpScriptBase.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLastPrice |
Returns the last traded price. In case the real time price is not available the closing value of the current bar is returned
(Inherited from SharpScriptBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasValue |
Returns if the underlying series has a value
(Inherited from SharpScriptBase.) | |
IsEqual |
Compares two sharp script objects
(Inherited from SharpScriptBase.) | |
IsInputEquals |
Compares two input
(Inherited from SharpScriptBase.) | |
Log |
Prints the messages in the Log tab in Main view
(Inherited from PrintLogBase.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NotifyPropertyChanged |
Notify property change
(Inherited from SharpScriptBase.) | |
OnBarUpdate |
Called on a new tick
(Inherited from SharpScriptBase.) | |
OnConnectionStatus |
Raised when the connection status changes
| |
OnFill |
Raised when an order is filled
| |
OnMarketData | (Inherited from SharpScriptBase.) | |
OnOrderUpdate |
Raised when the Order State is changed
| |
OnPositionUpdate |
Raised when the position is updated
| |
OnStateChange |
Called on when the SharpScript state is changed
(Inherited from SharpScriptBase.) | |
PlaySound |
Plays a sound file
(Inherited from SharpScriptBase.) | |
Plot |
Plots the series
(Overrides SharpScriptBasePlot(DrawingContext, Double, Double, Int32, Int32, Double, Double).) | |
Prints the message in the Output view
(Inherited from PrintLogBase.) | ||
SetStop(Double) |
Submits a new stop order for entry orders with entry name as 'Strategy Entry' (default entry order name)
If stop order with the same entry order name exits, then changes the order if the stop price differs
This method will be ignored if set when the Strategy is in Initialized state
| |
SetStop(Double, CalculationMode) |
Submits a stop order for entry orders with entry name as 'Strategy Entry' (default entry name)
If stop order with the same entry order name exists, then changes the order if the stop price differs.
If called when the strategy is in Initialized state then all subsequent entry trades with the same entry name will automatically place an stop order as defined by the method
| |
SetStop(Double, String) |
Submits a new stop order. If stop order with the same entry order name exits, then changes the order if the stop price differs
This method will be ignored if set when the Strategy is in Initialized state
| |
SetStop(Double, CalculationMode, String) |
Submits a stop order.
If stop order with the same entry order name exits, then changes the order if the stop price differs.
If called when the strategy is in Initialized state then all subsequent entry trades with the same entry name will automatically place an stop order as defined by the method
| |
SetTarget(Double) |
Submits a limit order. If a limit order with the same entry order name exits then changes that order if the price differs
This method will be ignored if called when the strategy is in Initialized state
| |
SetTarget(Double, CalculationMode) |
Submits a limit order. If a limit order with the same entry order name exits then changes that order if the price differs
If called when the strategy is in Initialized state then all subsequent entry trades with the same entry name will automatically place a target order as defined by the method
| |
SetTarget(Double, String) |
Submits a limit order. If a limit order with the same entry order name exits then changes that order if the price differs
This method will be ignored if called when the strategy is in Initialized state
| |
SetTarget(Double, CalculationMode, String) |
Submits a limit order. If a limit order with the same entry order name exits then changes that order if the price differs
If called when the strategy is in Initialized state then all subsequent entry trades with the same entry name will automatically place a target order as defined by the method
| |
ToString | (Inherited from SharpScriptBase.) |