Replies

nmaxcom
02 Apr 2020, 11:19

RE:

PanagiotisCharalampous said:

I am not really sure what are you trying to achieve here

I am just giving my opinion on what seems to me, a very obvious pointer in a particular part of the API design. My point  was that this:

        protected override void OnBar(Bar bar) {
            if (bar.Open > bar.Close) Print("Bullish bar!");
        }

is much more natural than this:

        protected override void OnBar() {
            if (Bars.OpenPrices.Last(1) > Bars.ClosePrices.Last(1)) Print("Bullish bar!");
        }

And that's just providing the simplest of examples. The more elaborated one gets developing a bot, for example, the messy it looks. And even though sometimes we forget who the code is for, the code is for humans, not for machines. And C# is a tremendous human-designed language versus, say, C. Great choice of language, improvable API design.

It's my subjective opinion. I'm not expecting anyone going nuts and get angry but just taking a note for possible future improvement. I understand you've based the series on IEnumerables

I also wanted to open a new thread to propose opening up the API documentation so users can contribute with better explanations and examples. Right now has a few outdated info, very little information, and fewer examples. You'd make that part less difficult on yourselves and users would understand the API way better and therefore lessen the load on the forums and increase cTrader's appeal to automation.

 


@nmaxcom

nmaxcom
01 Apr 2020, 21:54

RE:

PanagiotisCharalampous said:

Hi nmaxcom,

OnBar() is called whenever a bar is closed and a new bar is created. It is a simultaneous event, there is no in between situation. Last(0) represents the current bar and Last(1) the bar before. It is just a convention that you need to get used to it. 

Best Regards,

Panagiotis 

Join us on Telegram

Gotcha, not great fans of constructive criticism.

While on the OnBar() topic, isn't it called every tick just like OnTick()? At least it does in my system.


@nmaxcom

nmaxcom
31 Mar 2020, 10:25

RE:

PanagiotisCharalampous said:

Hi nmaxcom,

I don't understand what is the problem with Last(1). Can you please explain?

Best Regards,

Panagiotis 

Join us on Telegram

 

 

I'm pretty sure I'm being a little finicky here, but it doesn't seem natural to have a method that is called for each new bar, only to have to add Last(1) or similar options to get to the complete bar you are really after.

I concede "OnBar" makes sense with the fact that all OHLC values are the same. What I'm questioning here is the usefulness of such a method, versus something along the lines of  "OnBarClosed" for example. That would allow a developer to reason more simply about the bars we want to extract conclusions from and order a market buy or sell.

I've looked up the Bars events and there's only for when a bar opens, not when a bar closes.  Again, when a bar opens there's nothing that useful to do with it, except knowing the current time. Because the bar is still ticking, TickVolume value isn't there yet, OHLC values aren't there yet.

Working like this would make much more sense to me:

protected override void OnCompletedBar(Bar bar)
        {
            Print("Last complete bar closed at " + bar.Close);
            Print("And its predecesor closed at " + bar.Close.Last(1));
        }

Wouldn't it? 1) The bar is provided and 2) it's a completed bar one can work with.

So the actual code I posted before:

protected override void OnBar()
        {
            Print("T: " + Bars.OpenTimes.Last(1).ToLocalTime() + " \tO: " + Bars.OpenPrices.Last(1) + "  \tH: " + Bars.HighPrices.Last(1) + "  \tL: " + Bars.LowPrices.Last(1) + "  \tC:" + Bars.ClosePrices.Last(1));
        }

Would look like this:

protected override void OnCompletedBar(Bar bar)
        {
            Print("T: " + bar.OpenTime.ToLocalTime() + " \tO: " + bar.Open + "  \tH: " + bar.High + "  \tL: " + bar.Low + "  \tC:" + bar.Close);
        }

Isn't this more sensible?


@nmaxcom

nmaxcom
30 May 2019, 00:31

Hi both,

It is seems there is a position open when the backtesting is completed.

 you still have position(s) open when the backtest period ends.

You don't say? You are not telling me anything I don't know. That's exactly what I said in OP:

Every time I backtest my code, the equity chart always ends with a considerable equity drawdown. I speculate it is because when the simulation ends, whatever open positions existed at that moment were just cut off

So, backtesting stops whenever it's set to stop, but when it happens with open positions, the graph shows an equity drawdown that never happened.


@nmaxcom

nmaxcom
20 May 2019, 16:09

Hi,

What you are showing to us is the values that the equity fluctuated in between since closing the last position.

I'm not sure that sentence makes syntactical sense, could you clarify?

I use Print() every time a position is opened or closed. During the backtesting, positions open and close. But near the end, positions open and the backtesting ends. So in the log, you'd see it ends with "positions opened" X amount of times instead of "positions closed." So programmatically speaking my code doesn't have the chance to close those positions.


@nmaxcom

nmaxcom
20 May 2019, 16:02

Yes, that makes sense. I didn't read the whole phrase.

I think it is a bit of a UX oversight. Having an all-time ROI is fine, but shouldn't it also show the ROI of the time frame the filter was set for?

Otherwise, AFAIK, you have to get inside the candidates one by one and play with the chart inside to know the ROI of the particular time frame.


@nmaxcom

nmaxcom
18 May 2019, 07:10

My mistake, I wanted this in the Copy section.


@nmaxcom

nmaxcom
12 Aug 2017, 04:39

RE:

Spotware said:

Hi nmaxcom,

Your concerns have been addressed recently by the company's CEO, Andrey Pavlov, in his reply to an open letter by the community. You can find his reply here. More specifically we quote the following regarding cAlgo.

"cAlgo was in maintenance mode for a long time, I will not make a secret out of this, that's changed - it is now under new management of a promising professional who I hope will engage with you here and his plans are vast, including: API growth vertically and horizontally, IDE and backtesting improvements, monetization for you guys through a cBot store, maybe even cloud execution"

We hope that the above clarifies the situation for you.

Best Regards,

cTrader Team

I appreciate your response, "Spotware" (you really have to start using your own names, it's community building 101).

On one hand, I'm sad to see that my negative assumptions about cAlgo were indeed correct, as confirmed by the CEO. Potential has been left behind for years. On the other hand, it's good to read that someone is allegedly about to change that huge mistake.

For now, it's only words, and almost 3 years of people getting ignored and getting left behind will take some real work by Spotware to make it up to the community.

I think it's sad it required an open letter by a very disappointed client (following by another disappointed supporter of the first one) for the CEO to open his mouth and give us a glimmer of hope.

You guys really need to make some PR changes. For one, address to people by your own names; you can all use the same handle "Spotware" but sign it with a name. Even better would be to use support accounts with your own personalized avatars (face pictures or otherwise) so we can put "a face" on it and have a two way improved relationship.

And how about a road map so we can know what to expect? What to wait for?

I've sprayed suggestions in this forum and other parts of spotware, so I'll stop here.

Thank you for the link to the letter, it did help.

I sincerely hope you guys get back on track, your product is great and the potential is terrific.


@nmaxcom

nmaxcom
06 Aug 2017, 00:18

RE:

Spotware said:

We plan... to start working... on officially supporting...

Wow. That's an excited team if I've seen one. Let's face it, cAlgo is an abandoned project.

In your signature it says: "TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/"

Has anyone seen the cAlgo section? The most voted features, with hundreds of votes, have been abandoned from 2014. Not even an answer from Spotware. When your motto, with a huge typefont in your home page says "TRADERS FIRST", that's hypocritical, to say the least.

Someone is letting thick dust settle on cAlgo. And listen, I'm sure there are good reasons. Maybe the rise of good online backtesting solutions like quantopian and quantconnect just to name two have you cornered; maybe is another thing. Whatever it is, just be straight with the community you so loudly say to respect, tell the truth and stop letting people hanging for features and updates that will never come.

 

I hope my only point is clear: If you are going to do something with cAlgo or not, just f* say it. Today.


@nmaxcom

nmaxcom
02 Jan 2017, 08:45

I'd be awesome to have a reply to this question


@nmaxcom

nmaxcom
02 Jan 2017, 08:20

RE:

Spotware said:

Dear Trader,

The line will not be drawn. ChartObjects is disabled in backtesting.

Why??


@nmaxcom

nmaxcom
08 Dec 2016, 09:52

I'd drop cTrader as a charting software. Have you taken a look at tradingview? Now that's fluid


@nmaxcom

nmaxcom
08 Dec 2016, 09:44

It is indeed ridiculous that they haven't ported it to mac yet.


@nmaxcom

nmaxcom
09 Jun 2016, 15:44

Did you abandoned this question for good? Why?


@nmaxcom

nmaxcom
25 May 2016, 05:10

I'm not sure we are talking about the same thing.

 

As clear as it gets: https://www.youtube.com/watch?v=-4dIZPhm0uo


@nmaxcom

nmaxcom
24 May 2016, 08:09

What's an automatic converter?


@nmaxcom