Message Box API Errors in Calculate Method

Created at 29 Mar 2024, 06:02
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!
ClickAlgo's avatar

ClickAlgo

Joined 05.02.2015

Message Box API Errors in Calculate Method
29 Mar 2024, 06:02


The usage of a MessageBox in the Calculate method results in an error.

 29/03/2024 07:57:42.055 Error MessageBox Error Test, EURAUD, m1 Crashed in Calculate with InvalidOperationException: Operation is not valid due to the current state of the object.

       public override void Calculate(int index)
        {
            if(IsLastBar && _index != index)
            {
                MessageBox.Show("hello");
            }
        }

@ClickAlgo
Replies

ClickAlgo
29 Mar 2024, 06:53 ( Updated at: 29 Mar 2024, 09:06 )


@ClickAlgo