How do I get the minimum equity?

Created at 22 Feb 2021, 16:15
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CH

ChannelTrader

Joined 31.03.2020

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


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


@ChannelTrader
Replies

PanagiotisCharalampous
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


@PanagiotisCharalampous

ChannelTrader
22 Feb 2021, 16:31 ( Updated at: 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

 

@ChannelTrader

... Deleted by UFO ...