LoadMoreHistory() on Ticks gives an AlgoAbortedException on Spotware AUDUSD feed.

Created at 17 Nov 2020, 12:32
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!
SH

Shares4us

Joined 01.04.2020

LoadMoreHistory() on Ticks gives an AlgoAbortedException on Spotware AUDUSD feed.
17 Nov 2020, 12:32


Usage in Indicator => indicator keeps on restarting.

Same error also on Bars.LoadMoreHistory() sometimes.

Solution:
Please do not throw that error (meaningless) but return 0 for the count and/or a 'corrupt datafeed' or 'connection interrupt' error or whatever

Now the indicator keeps on restarting, and sometimes (a wonder) collects the data and continues up unto the next error in LoadMoreHistory() (if more data requested)) Which leads me to the presumption it is some kond of communication problem. (If so maybe a few retries would be handy)

Best rgds,

ton


    void LoadMoreTicks(DateTime toDate)
        {
            try
            {
                int _loaded = SymbolTicks.Count;
                while (toDate <= SymbolTicks[0].Time && _loaded > 0)
                    _loaded = SymbolTicks.LoadMoreHistory();
            }
            catch (Exception ex)
            {
                CheckPrint(this.ToString() + " ERROR:" + ex.Message + " " + ex.StackTrace.ToString());
            }
        }

Exception of type 'cTrader.Automate.Small.V1.Exceptions.AlgoAbortedException' was thrown.

at cTrader.Automate.Small.V1.MessageDispatcher.BeginWait[TMessage](Func`2 predicate)
at cTrader.Automate.Small.V1.MessageDispatcher.SendMessageWithResponse[TRequestMessage,TResponseMessage](TRequestMessage requestMessage, Func`2 predicate)
at cTrader.Automate.Small.V1.Dispatchers.MessageHandlingStrategy.SendMessageWithResponse[TRequestMessage,TResponseMessage](TRequestMessage requestMessage, Func`2 predicate)
at cTrader.Automate.Small.V1.MarketApi.SmallChartSourceController.LoadHistory(String symbolName, TimeFrame timeFrame)
at cTrader.Automate.Small.V1.MarketApi.SmallChartSourceBase`1.LoadMoreHistory()
at cAlgo.VADTUAI2_4.LoadMoreTicks(DateTime toDate) in c:\Users\xxxxxx\Documents\cAlgo\Sources\xxxx\xx\xx\xx.cs:line 241




@Shares4us
Replies

PanagiotisCharalampous
17 Nov 2020, 13:58

Hi Ton,

This exception is thrown when cTrader disconnects/reconnects. You should handle the exception accordingly on your side.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

Shares4us
17 Nov 2020, 14:14

RE:

Thanks, just what i thought.

Is there another way to check if it was due to a connection reset/failure?

Idea: Maybe not throw an abort exception but a more meaningfull one?
Would have saved you and me handling this Post.

 


@Shares4us