How do I get the minimum equity?

ChannelTrader since: 31 Mar 2020;

  22 Feb 2021, 16:15
How do I get the minimum equity?

I'm trying to get the minimum equity with a variable, but should I use a negative signal on it like bellow?

var minumumequity = -Account.Equity

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  22 Feb 2021, 16:19

Hi ChannelTrader,

See an example below

        double _minEquity; 
        protected override void OnStart()
        {
            _minEquity = Account.Equity;
        }

        protected override void OnTick()
        {
            if (Account.Equity < _minEquity)
                _minEquity = Account.Equity;
        }

Best Regards,

Panagiotis 

Join us on Telegram

Head of Community Management at cTrader

ChannelTrader since: 31 Mar 2020;

  22 Feb 2021, 18:02
RE:

PanagiotisCharalampous said:

Hi ChannelTrader,

See an example below

        double _minEquity; 
        protected override void OnStart()
        {
            _minEquity = Account.Equity;
        }

        protected override void OnTick()
        {
            if (Account.Equity < _minEquity)
                _minEquity = Account.Equity;
        }

Best Regards,

Panagiotis 

Join us on Telegram

Hi Mr. Panagiotis, thank you for your repply. 

Worked perfectly