Ating for MQL5
|
Class to handle the stages of moving stop loss to break-even for multiple positions. More...
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. | |
Class to handle the stages of moving stop loss to break-even for multiple positions.
|
inline |
Default constructor for the BreakEvenStages class.
|
inline |
Destructor for the BreakEvenStages class.
bool BreakEvenStages::UpdateTickets | ( | ) |
Updates the array of position tickets based on the current positions.
void BreakEvenStages::Verify | ( | ) |
Verifies and updates stop loss for all tracked positions.