C# Class Forex_Strategy_Builder.Strategy

Mostra file Open project: nuggett11/Forex-Strategy-Builder Class Usage Examples

Public Methods

Method Description
AddCloseFilter ( ) : int

Adds a new Close Filter to the strategy.

AddOpenFilter ( ) : int

Adds a new Open Filter to the strategy.

AdjustUsePreviousBarValue ( ) : bool

Sets Use prv bar value automaticaly

Clone ( ) : Strategy

Returns a copy of the current strategy.

DuplicateFilter ( int slotToDuplicate ) : void

Duplicates an logic condition.

GenerateBBCode ( ) : string

Saves the strategy in BBCode format.

GenerateHTMLOverview ( ) : string

Generate Overview in HTML code

GenerateNew ( ) : void

Generates a new strategy.

GetDefaultGroup ( int slot ) : string

Gets the default logical group for the designated slot number.

GetSlotType ( int slot ) : SlotTypes

Gets the type of the slot.

Load ( string filename ) : bool

Loads the strategy from a file in XML format.

MoveFilterDownwards ( int slotToMove ) : void

Moves a filter downwards.

MoveFilterUpwards ( int slotToMove ) : void

Moves a filter upwards.

PrepareUsePrevBarValueCheckBox ( SlotTypes slotType ) : bool

Prepare the checkbox

RemoveAllCloseFilters ( ) : void

Removes all close filters from the strategy.

RemoveFilter ( int slotToRemove ) : void

Removes a filter from the strategy.

Save ( string fileName ) : void

Saves the strategy in XML format.

SetFirstBar ( ) : int

Sets the strategy First Bar. It depends on the indicators periods.

SetUsePrevBarValueCheckBox ( int slot ) : bool

Sets the "Use previous bar value" checkbox

Strategy ( ) : System

The default constructor.

Strategy ( int openFilters, int closeFilters ) : System

Sets a new strattegy.

ToString ( ) : string

Represents the strategy in a readable form.

Private Methods

Method Description
AdditionalStatsHTMLReport ( ) : StringBuilder

Generates a HTML report about the additional stats

AveragingHTMLReport ( ) : StringBuilder

Generates a HTML report about the averaging logic.

ClosingLogicHTMLReport ( ) : StringBuilder

Generates a HTML report about the closing logic.

CreateStrategy ( int openFilters, int closeFilters ) : void

Creates a strategy

EnvironmentHTMLReport ( ) : StringBuilder

Generates a HTML report about the trading environment.

OpeningLogicHTMLReport ( ) : StringBuilder

Generates a HTML report about the opening logic.

Plural ( string unit, double number ) : string

Appends "s" when plural

StrategyPropertiesHTMLReport ( ) : StringBuilder

Generates a HTML report about the strategy properties.

StrategySlotsHTMLReport ( ) : StringBuilder

Generates a HTML report about the strategy slots

TradingSizeHTMLReport ( ) : StringBuilder

Generates a HTML report about the trading sizes.

TradingStatsHTMLReport ( ) : StringBuilder

Generates a HTML report about the trading stats

Method Details

AddCloseFilter() public method

Adds a new Close Filter to the strategy.
public AddCloseFilter ( ) : int
return int

AddOpenFilter() public method

Adds a new Open Filter to the strategy.
public AddOpenFilter ( ) : int
return int

AdjustUsePreviousBarValue() public method

Sets Use prv bar value automaticaly
public AdjustUsePreviousBarValue ( ) : bool
return bool

Clone() public method

Returns a copy of the current strategy.
public Clone ( ) : Strategy
return Strategy

DuplicateFilter() public method

Duplicates an logic condition.
public DuplicateFilter ( int slotToDuplicate ) : void
slotToDuplicate int
return void

GenerateBBCode() public method

Saves the strategy in BBCode format.
public GenerateBBCode ( ) : string
return string

GenerateHTMLOverview() public method

Generate Overview in HTML code
public GenerateHTMLOverview ( ) : string
return string

GenerateNew() public static method

Generates a new strategy.
public static GenerateNew ( ) : void
return void

GetDefaultGroup() public method

Gets the default logical group for the designated slot number.
public GetDefaultGroup ( int slot ) : string
slot int
return string

GetSlotType() public method

Gets the type of the slot.
public GetSlotType ( int slot ) : SlotTypes
slot int
return SlotTypes

Load() public static method

Loads the strategy from a file in XML format.
public static Load ( string filename ) : bool
filename string
return bool

MoveFilterDownwards() public method

Moves a filter downwards.
public MoveFilterDownwards ( int slotToMove ) : void
slotToMove int
return void

MoveFilterUpwards() public method

Moves a filter upwards.
public MoveFilterUpwards ( int slotToMove ) : void
slotToMove int
return void

PrepareUsePrevBarValueCheckBox() public method

Prepare the checkbox
public PrepareUsePrevBarValueCheckBox ( SlotTypes slotType ) : bool
slotType SlotTypes
return bool

RemoveAllCloseFilters() public method

Removes all close filters from the strategy.
public RemoveAllCloseFilters ( ) : void
return void

RemoveFilter() public method

Removes a filter from the strategy.
public RemoveFilter ( int slotToRemove ) : void
slotToRemove int
return void

Save() public method

Saves the strategy in XML format.
public Save ( string fileName ) : void
fileName string
return void

SetFirstBar() public method

Sets the strategy First Bar. It depends on the indicators periods.
public SetFirstBar ( ) : int
return int

SetUsePrevBarValueCheckBox() public method

Sets the "Use previous bar value" checkbox
public SetUsePrevBarValueCheckBox ( int slot ) : bool
slot int
return bool

Strategy() public method

The default constructor.
public Strategy ( ) : System
return System

Strategy() public method

Sets a new strattegy.
public Strategy ( int openFilters, int closeFilters ) : System
openFilters int
closeFilters int
return System

ToString() public method

Represents the strategy in a readable form.
public ToString ( ) : string
return string