2026-07-18 15:53:04 -04:00
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| MoneyFixedRisk.mqh |
|
|
|
|
|
//| Copyright 2000-2023, MetaQuotes Ltd. |
|
|
|
|
|
//| https://www.mql5.com |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
#include "MoneyRiskBase.mqh"
|
|
|
|
|
// wizard description start
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Description of the class |
|
|
|
|
|
//| Title=Trading with fixed risk |
|
|
|
|
|
//| Type=Money |
|
|
|
|
|
//| Name=FixRisk |
|
|
|
|
|
//| Class=CMoneyFixedRisk |
|
|
|
|
|
//| Page= |
|
|
|
|
|
//| Parameter=Percent,double,10.0,Risk percentage |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
// wizard description end
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Class CMoneyFixedRisk. |
|
|
|
|
|
//| Purpose: Class of money management with fixed percent risk. |
|
|
|
|
|
//| Derives from CMoneyRiskBase, which now houses the |
|
|
|
|
|
//| CheckOpenLong/Short + lot-sizing core this class |
|
|
|
|
|
//| used to duplicate with CMoneyIntelligent - no |
|
|
|
|
|
//| AdjustRiskAmount()/AdjustLotSize() override needed |
|
|
|
|
|
//| here, the base class's plain-risk defaults are |
|
|
|
|
|
//| exactly this strategy's behavior. |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
class CMoneyFixedRisk : public CMoneyRiskBase
|
|
|
|
|
{
|
|
|
|
|
};
|
|
|
|
|
//+------------------------------------------------------------------+
|