Ating for MQL5
Loading...
Searching...
No Matches
BreakEvenStages Class Reference

Class to handle the stages of moving stop loss to break-even for multiple positions. More...

+ Inheritance diagram for BreakEvenStages:
+ Collaboration diagram for BreakEvenStages:

Public Member Functions

 BreakEvenStages (void)
 Default constructor for the BreakEvenStages class.
 
 ~BreakEvenStages (void)
 Destructor for the BreakEvenStages class.
 
bool UpdateTickets ()
 Updates the array of position tickets based on the current positions.
 
void Verify ()
 Verifies and updates stop loss for all tracked positions.
 
- Public Member Functions inherited from ProfitProtection
 ProfitProtection (void)
 Default constructor for the ProfitProtection class.
 
void UpdateAtr (ulong magic_arg, string symbol_arg, double activation_percent_arg, double deviation_percent_arg)
 Updates the attributes of the ProfitProtection class.
 
bool ModifyStopLossFromPositionBuy (ulong ticket, double newStopLoss)
 Modifies the stop loss for a buy position.
 
bool ModifyStopLossFromPositionSell (ulong ticket, double newStopLoss)
 Modifies the stop loss for a sell position.
 
double GetActivationPrice (ulong positionTicket)
 Calculates the activation price for a given position based on the activation percentage.
 

Additional Inherited Members

- Public Types inherited from ProfitProtection
enum  ENUM_PROFIT_PROTECTION_TYPE { TRAILING_STOP , BREAK_EVEN }
 Enumeration of different profit protection types. More...
 
- Public Attributes inherited from ProfitProtection
double activationPercent
 Activation percentage for profit protection.
 
double deviationPercent
 Deviation percentage for profit protection.
 
ulong magic
 Magic number for trade operations.
 
string symbol
 Trading symbol.
 
CTrade trade
 Trade object for performing trade operations.
 
DetectPositions detectPositions
 Object for detecting positions.
 

Detailed Description

Class to handle the stages of moving stop loss to break-even for multiple positions.

Constructor & Destructor Documentation

◆ BreakEvenStages()

BreakEvenStages::BreakEvenStages ( void )
inline

Default constructor for the BreakEvenStages class.

◆ ~BreakEvenStages()

BreakEvenStages::~BreakEvenStages ( void )
inline

Destructor for the BreakEvenStages class.

Member Function Documentation

◆ UpdateTickets()

bool BreakEvenStages::UpdateTickets ( )

Updates the array of position tickets based on the current positions.

Returns
True if tickets are successfully updated, otherwise false.
+ Here is the call graph for this function:

◆ Verify()

void BreakEvenStages::Verify ( )

Verifies and updates stop loss for all tracked positions.

+ Here is the call graph for this function:

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