C# Class Forex_Strategy_Builder.Dialogs.Generator.Generator

Strategy Generator
Mostrar archivo Open project: nuggett11/Forex-Strategy-Builder Class Usage Examples

Public Methods

Method Description
Generator ( ) : System

Constructor

Protected Methods

Method Description
BtnSlotSize_Click ( object sender, EventArgs e ) : void

Changes the slot size

BtnStrategyDescription_Click ( object sender, EventArgs e ) : void

View and edit the strategy description

ChangeSlotStatus ( object sender, EventArgs e ) : void

Lock, unlock, link all slots.

OnLoad ( EventArgs e ) : void

Perform initializing

OnResize ( EventArgs e ) : void

Recalculates the sizes and positions of the controls after resizing

Show_Overview ( object sender, EventArgs e ) : void

Shows strategy overview.

Private Methods

Method Description
AccountAutput_Click ( object sender, EventArgs e ) : void

Toggles the account chart and statistics.

AddStrategyToGeneratorHistory ( string description ) : void

Saves the Generator History

BgWorker_DoWork ( object sender, DoWorkEventArgs e ) : void

Does the job

BgWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

This event handler updates the progress bar.

BgWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

This event handler deals with the results of the background operation

BtnGenerate_Click ( object sender, EventArgs e ) : void

BtnGenerate_Click

BtnReset_Click ( object sender, EventArgs e ) : void

Resets Generator

CalculateIndicator ( SlotTypes slotType, Indicator indicator ) : bool

Calculates an indicator and returns OK status.

CalculateTheResult ( bool isSaveEqualResult ) : bool

Calculates the generated result

ChangeGeneratorPanel ( object sender, EventArgs e ) : void

Toggles panels.

ChangeNumericParameters ( BackgroundWorker worker ) : void

Change Numeric Parameters

ChangePermanentSL ( BackgroundWorker worker ) : void

Change Permanent Stop Loss

ChangePermanentTP ( BackgroundWorker worker ) : void

Change Permanent Take Profit

ChbOutOfSample_CheckedChanged ( object sender, EventArgs e ) : void

Out of Sample

CheckAvailableIndicators ( ) : bool

Checks if enough indicators are allowed

CheckForLockedSlots ( ) : void

Check if all slots are locked.

ClearStrategySlotsStatus ( Strategy strategy ) : Strategy

Clears the slots status of the given strategy.

GenerateCalculationErrorMessage ( string exceptionMessage ) : string

Composes an informative error message. It presumes that the reason for the error is a custom indicator. Ohhh!!

GenerateDescription ( ) : string

Generates a description

GenerateIndicatorName ( int slot ) : void

Calculate the indicator in the designated slot

GenerateIndicatorParameters ( int slot ) : void

Calculate the indicator in the designated slot

GeneratePermanentSL ( ) : void

Generates the Permanent Stop Loss

GeneratePermanentTP ( ) : void

Generates the Permanent Take Profit

GenerateSameOppSignal ( ) : void

Generate random same and opposite signal action

GenerateStrategySlots ( ) : void

Generates a random strategy

Generating ( BackgroundWorker worker, DoWorkEventArgs e ) : void

Generates a strategy

Generator_FormClosing ( object sender, FormClosingEventArgs e ) : void

Check whether the strategy have been changed

HideFSB_Click ( object sender, EventArgs e ) : void

Toggles FSB visibility.

IsLimitationsFulfilled ( ) : bool

Check the strategy limitations

LoadOptions ( ) : void

Loads and parses the generator's options.

NormalizeSameOppositeSignalBehaviour ( BackgroundWorker worker ) : void

Tries to clear the Same / Opposite Signals

NudOutOfSample_ValueChanged ( object sender, EventArgs e ) : void

Out of Sample

PerformInitialOptimization ( BackgroundWorker worker, bool isBetter ) : void

Initial Optimization

PnlProperties_Click ( object sender, EventArgs e ) : void

Lock, link, or unlock the strategy properties slot.

PnlSlot_Click ( object sender, EventArgs e ) : void

Lock, link, or unlock the strategy slot.

PrepareIndicatorLists ( ) : void

Prepare available indicators for each slot.

PrepareStrategyForGenerating ( ) : void

Prepare the strategy for generating

RebuildStrategyLayout ( Strategy strategy ) : void

Creates a new strategy layout according to the given strategy.

RecalculateSlots ( ) : void

Recalculate all the indicator slots

ReduceTheValuesOfNumericParams ( BackgroundWorker worker ) : void

Normalizes the numeric parameters.

RefreshAccountStatisticas ( ) : void

Refreshes the AccountStatistics

RefreshSmallBalanceChart ( ) : void

Refreshes the balance chart

RemoveNeedlessFilters ( BackgroundWorker worker ) : void

Removes the excessive filter.

RemovePermanentSL ( ) : void

Remove Permanent Stop Loss

RemovePermanentTP ( BackgroundWorker worker ) : void

Removes the Permanent Take Profit

ReportIndicatorError ( string text, string caption ) : void

Report Indicator Error

RestoreFromBest ( ) : void

Restores the strategy from the best one

SaveOptions ( ) : void

Saves the generator's options.

SetButtonsGenerator ( ) : void

Sets tool strip buttons

SetButtonsStrategy ( ) : void

Sets tool strip buttons

SetLabelCyclesText ( string text ) : void

Sets the lblCalcStrNumb.Text

SetOOS ( ) : void

Out of Sample

SetPanelCommon ( ) : void

Sets controls in panel Common

SetPanelIndicators ( ) : void

Sets controls in panel Indicators

SetPanelLimitations ( ) : void

Sets controls in panel Limitations

SetPanelSettings ( ) : void

Sets controls in panel Settings

SetPanelTop10 ( ) : void

Sets controls in panel Top 10

SetSrategyDescriptionButton ( ) : void

Sets the strategy description button icon

Top10AddStrategy ( ) : void

Adds a strategy to Top 10 list.

Top10Slot_Click ( object sender, EventArgs e ) : void

Loads a strategy from the clicked Top 10 slot.

UpdateStrategyInGeneratorHistory ( string description ) : void

Updates the last strategy in Generator History

Method Details

BtnSlotSize_Click() protected method

Changes the slot size
protected BtnSlotSize_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

BtnStrategyDescription_Click() protected method

View and edit the strategy description
protected BtnStrategyDescription_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

ChangeSlotStatus() protected method

Lock, unlock, link all slots.
protected ChangeSlotStatus ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Generator() public method

Constructor
public Generator ( ) : System
return System

OnLoad() protected method

Perform initializing
protected OnLoad ( EventArgs e ) : void
e System.EventArgs
return void

OnResize() protected method

Recalculates the sizes and positions of the controls after resizing
protected OnResize ( EventArgs e ) : void
e System.EventArgs
return void

Show_Overview() protected method

Shows strategy overview.
protected Show_Overview ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void