Download MetaTrader 5

CTrailingMA

CTrailingMA is a class with implementation of Trailing Stop algorithm based on the values of moving average indicator.

Description

CTrailingMA class implements Trailing Stop algorithm based on the values of moving average indicator of the previous (completed) bar.

Declaration

class CTrailingMA: public CExpertTrailing

Title

   #include <Expert\Trailing\TrailingMA.mqh>

Class Methods by Groups

Initialization

 

Period

Sets period of moving average

Shift

Sets shift of moving average

Method

Sets smoothing method of moving average

Applied

Sets applied price of moving average

virtual InitIndicators

Initializes indicators and timeseries

virtual ValidationSettings

Checks the settings

Check Trailing Methods

 

virtual CheckTrailingStopLong

Check Trailing Stop conditions of a long position

virtual CheckTrailingStopShort

Check Trailing Stop conditions of a short position


Updated: 2016.06.08