Skip to content

CExpertSignal

CExpertSignal

CExpertSignal is a base class for trading signals, it does nothing (except CheckReverseLong() and CheckReverseShort() methods) but provides the interfaces.

How to use it:

  1. Prepare an algorithm for trading signals;
  2. Create your own trading signal class, inherited from CExpertSignal class;
  3. Override the virtual methods in your class with your own algorithms.

You can find an examples of trading signal classes in the Expert\Signal\ folder.

Description

CExpertSignal is a base class for implementation of trading signal algorithms.

Declaration

class CExpertSignal : public CExpertBase

Title

#include <Expert\ExpertSignal.mqh>

Inheritance hierarchy

CObject

CExpertBase

CExpertSignal

Direct descendants

: CSignalAC, CSignalAMA, CSignalAO, CSignalBearsPower, CSignalBullsPower, CSignalCCI, CSignalDeM, CSignalDEMA, CSignalEnvelopes, CSignalFrAMA, CSignalRSI, CSignalRVI, CSignalSAR, CSignalStoch, CSignalTEMA, CSignalTriX, CSignalWPR

Class Methods by Groups

Initialization
virtual InitIndicatorsInitializes indicators and timeseries
virtual ValidationSettingsChecks the object settings
virtual AddFilterAdds a filter to combined signal
Access to Protected Data
BasePriceSets base price level
UsedSeriesGets the flags of timeseries used
Parameters Setting
WeightSets the value of “Weight” parameter
PatternsUsageSets the value of “PatternsUsage” parameter
GeneralSets the value of “General” parameter
IgnoreSets the value of “Ignore” parameter
InvertSets the value of “Invert” parameter
ThresholdOpenSets the value of “ThresholdOpen” parameter
ThresholdCloseSets the value of “ThresholdClose” parameter
PriceLevelSets the value of “PriceLevel” parameter
StopLevelSets the value of “StopLevel” parameter
TakeLevelSets the value of “TakeLevel” parameter
ExpirationSets the value of “Expiration” parameter
MagicSets the value of “Magic” parameter
Checking Trading Conditions
virtual CheckOpenLongChecks conditions to open long position
virtual CheckCloseLongChecks conditions to close long position
virtual CheckOpenShortChecks conditions to open short position
virtual CheckCloseShortChecks conditions to close short position
virtual CheckReverseLongChecks conditions of long position reversal
virtual CheckReverseShortChecks conditions of short position reversal
Trade Parameters Setting
virtual OpenLongParamsSets parameters for long position opening
virtual OpenShortParamsSets parameters for short position opening
virtual CloseLongParamsSets parameters for long position closing
virtual CloseShortParamsSets parameters for short position closing
Checking of Order Trailing Conditions
virtual CheckTrailingOrderLongChecks conditions to modify parameters of Buy Pending order
virtual CheckTrailingOrderShortChecks conditions to modify parameters of Sell Pending order
Methods to Check Formation of Market Orders
virtual LongConditionGets the result of checking buy conditions
virtual ShortConditionGets the result of checking sell conditions
virtual DirectionGets the “weighted” direction of price

Methods inherited from class CExpertBase

: InitPhase, TrendType, UsedSeries, EveryTick, Open, High, Low, Close, Spread, Time, TickVolume, RealVolume, Init, Symbol, Period, Magic, SetMarginMode, SetPriceSeries, SetOtherSeries

Last updated on