Abnormal Volume (0 lots) Warning Nightmare in new CTrader 3.0

Created at 07 Aug 2018, 15:25
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!
LA

lavio@gigalink.com.br

Joined 11.07.2017

Abnormal Volume (0 lots) Warning Nightmare in new CTrader 3.0
07 Aug 2018, 15:25


I have a CalcVol() function.

After using CTrader 3.0, sometimes it starts poping warnings at the top right corner of attempting to open a position with a "abnormal" volume and 0 lots. Using 2.0 it never happened.

Then at the end I wrote:

            ret = ..... has the calculation for the volume to be used.

            double vol = Symbol.NormalizeVolumeInUnits(ret, RoundingMode.ToNearest);
            if (vol > Symbol.VolumeInUnitsMax)
                vol = Symbol.VolumeInUnitsMax;
            else if (vol < Symbol.VolumeInUnitsMin)
                vol = Symbol.VolumeInUnitsMin;
            return(vol);

However, the warnings still do popup sometimes. And after they start, more and more robots popup the same warning progressively. Of course, nothing works if volumes are "abnormal". I need to stop the robots and reinitiate. Then the warnings stop and the positions get open again (market or limit pending, no matter).

In  the robots code there is NO OTHER way to open positions without going through the CalcVol() mentioned above first.

So, how can it be possible? It seems a very serious bug to me.

Lavio


@lavio@gigalink.com.br
Replies

lavio@gigalink.com.br
08 Aug 2018, 05:30

When trying to open a position, market or limit pending, sometimes it says the volume is abnormal, 0 lots.
Other times, it says the stops are bad.

However, 1) such errors never did happen before version 3; 2) the code DOES not send crazy volumes or stops.

And 3) it seems they start after a "reconnecting..." issue ou a "not responding..." state that takes from 5 to 15 minutes to recover.

This "not responding" problem is very common if you minimize the program and let the machine working alone, doing nothing. Notice that the computer never stops (suspention or hibernation) for any reason (energy savings or whatever). But when you try to open the program again, to maximize, voila, it gets stuck on the "not responding..." state for several minutes.

Today it did happen again twice. The first time I stopped the suspicious robots and reinitiated them. Ok, it worked for a couple of hours. It started again and then I exited the program (CTrader), reopened the program and reinitiated every robot, manually (they all start stopped). And this did work, the errors vanished. The same robots now started to open positions as expected.

Any possible explanation and solution?

Lavio


 


@lavio@gigalink.com.br