Diamond Strategies - Trading Automation documentation
Help and documentation for developing automated trading algorithms using the Diamond Strategies automation framework.
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
DiamondStrategies.Domain.Inheritance.DiamondStrategyResult Class Reference

A Diamond Strategy Result file containing the result of a strategy execution. More...

Public Member Functions

string LimitsPrintable (LimitClose[] limits)
 A method that puts an array of LimitClose objects into human readable string. Used for extended logging. More...
 
string LimitsPrintable (LimitClose limit)
 A method that puts LimitClose object into human readable string. Used for extended logging. More...
 
override string ToString ()
 A method that puts all this object properties into human readable string. Used for extended logging. More...
 

Public Attributes

int ResultIndexInBatch = 0
 This must be used when strategy generates same signal multiple times in a single iteration and all of them are valid and not considered duplicates. Give a unique index to each signal in the batch to have all the signals executed. Otherwise the executor will tread those signals as duplicates and only execute a single one. More...
 

Protected Member Functions

 DiamondStrategyResult (string log, Timeframes executionTf, DiamondStrategy triggerStrategy, IInstrument instrument, int barIndex, object[] optionalArgs)
 
 DiamondStrategyResult (string log, Timeframes executionTf, DiamondStrategy triggerStrategy, IInstrument instrument, int barIndex)
 

Properties

abstract DiamondStrategyExecResultType ResultType [get]
 Execution result type. BuyLimit, BuyStop, GoLongMarket, SellLimit, SellStop, GoShortMarket, Close, ClosePartial, ModifyPosition, Cancel, NoSignal, ERROR or ERRORFATAL/ More...
 
abstract string UniqueId [get]
 Execution result unique id. More...
 
IInstrument Instrument [get, set]
 Instrument that this result was generated for. More...
 
int BarIndex [get, set]
 Index of the bar on which this result was generated. In a backtester execution this value changes as the backtester loops historical data. More...
 
DiamondStrategy TriggerStrategy [get, set]
 Strategy that generated this result. More...
 
object TriggerSubStrategy [get, set]
 Sub strategy that generated this result. More...
 
List< object > CustomStrategyProps [get, set]
 A list of objects with custom strategy properties. More...
 
Timeframes ExecutionTf [get, set]
 Execution timeframe. More...
 
string Log [get, set]
 Log object. More...
 
DateTime ExecutionDate [get, set]
 Execution date. More...
 

Detailed Description

A Diamond Strategy Result file containing the result of a strategy execution.

Member Function Documentation

◆ LimitsPrintable() [1/2]

string DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.LimitsPrintable ( LimitClose  limit)
inline

A method that puts LimitClose object into human readable string. Used for extended logging.

Parameters
limitLimitClose object to print.
Returns
A string containing all this object properties.

◆ LimitsPrintable() [2/2]

string DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.LimitsPrintable ( LimitClose[]  limits)
inline

A method that puts an array of LimitClose objects into human readable string. Used for extended logging.

Parameters
limitArray of LimitClose objects to print.
Returns
A string containing all this object properties.

◆ ToString()

override string DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.ToString ( )
inline

A method that puts all this object properties into human readable string. Used for extended logging.

Returns
A string containing all this object properties.

Member Data Documentation

◆ ResultIndexInBatch

int DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.ResultIndexInBatch = 0

This must be used when strategy generates same signal multiple times in a single iteration and all of them are valid and not considered duplicates. Give a unique index to each signal in the batch to have all the signals executed. Otherwise the executor will tread those signals as duplicates and only execute a single one.

Property Documentation

◆ BarIndex

int DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.BarIndex
getset

Index of the bar on which this result was generated. In a backtester execution this value changes as the backtester loops historical data.

◆ CustomStrategyProps

List<object> DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.CustomStrategyProps
getset

A list of objects with custom strategy properties.

◆ ExecutionDate

DateTime DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.ExecutionDate
getset

Execution date.

◆ ExecutionTf

Timeframes DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.ExecutionTf
getset

Execution timeframe.

◆ Instrument

IInstrument DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.Instrument
getset

Instrument that this result was generated for.

◆ Log

string DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.Log
getset

Log object.

◆ ResultType

abstract DiamondStrategyExecResultType DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.ResultType
get

Execution result type. BuyLimit, BuyStop, GoLongMarket, SellLimit, SellStop, GoShortMarket, Close, ClosePartial, ModifyPosition, Cancel, NoSignal, ERROR or ERRORFATAL/

◆ TriggerStrategy

DiamondStrategy DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.TriggerStrategy
getset

Strategy that generated this result.

◆ TriggerSubStrategy

object DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.TriggerSubStrategy
getset

Sub strategy that generated this result.

◆ UniqueId

abstract string DiamondStrategies.Domain.Inheritance.DiamondStrategyResult.UniqueId
get

Execution result unique id.


The documentation for this class was generated from the following file: