Replies

couscousmckoy
07 Nov 2024, 20:26 ( Updated at: 08 Nov 2024, 06:14 )

RE: Two years testing cTrader, and now the troubles of 5.0.40

PanagiotisCharalampous said: 

Hi all,

This problem should have been resolved by now. Please restart your cTrader and in case you still experience problems, please send us some troubleshooting information quoting this thread.

Best regards,

Panagiotis

I know you've probably not had the best of weeks but I think Patty's eloquent, insightful and detailed feedback possibly deserved a bit more than your identikit "problem solved" response.  Probably unfair of me considering, but at the very least I hope Spotware takes points on board points 1,2,4 and 5 relating more to development process than any particular bug.


@couscousmckoy

couscousmckoy
05 Nov 2024, 11:16

Any update?

Ctrader guys have gone very quiet.  Come on chaps - some communication would be good here?  An apology… an explanation…a timeline of when you anticipate basic system functionality as outlined in OP's post might be restored?  Not being able to save workspace or any markups to my charts really sucks.  I'm still incredulous that these issues weren't picked up as a matter of course in your pre-release testing.  Software Development 101 - don't screw up functionality that your userbase, your clients, use day in day out in the pursuit of adding something new.  It really, REALLY frustrates people.  But if you do mess up (and I mess up more than most, it does happen!) please be honest about it and keep people informed so they can plan their work in the meantime. 


@couscousmckoy

couscousmckoy
04 Nov 2024, 16:58

RE: Blank indicator, cant switch workspace, setting and charts do not save after closing ctrader, cbots cant be launched

bcronje said: 

I too have these issues, exactly as the OP posted.

 

Same issues here.  Do you guys test ANY of your releases or do you just wait for us to report issues.  Its the same EVERY SINGLE release!

 


@couscousmckoy

couscousmckoy
18 Oct 2024, 08:09 ( Updated at: 18 Oct 2024, 08:49 )

RE: ChartArea Max X value

PanagiotisCharalampous said: 

Hi there,

You can use a combination of Chart.FirstVisibleBarIndex + Chart.MaxVisibleBars to get the last index on the chart.

Best regards,

Panagiotis

Thank you Panagiotis.  Works a treat.  For some reason I assumed that the maximum index was the index of the last printed bar and that if you tried to reference an index greater than that it would throw an error.  Not sure why I thought that - I was obviously wrong!

For anyone else wanting to do something similar here is the code snippet (draws vertical line 2 bars in from the right hand edge of the screen, but same would work for DrawText - you just need to work out a suitable offset back from that last index to allow all your text label to display before it disappears off the right hand edge of the ChartArea).

Chart.DrawVerticalLine("line", Chart.FirstVisibleBarIndex+Chart.MaxVisibleBars-2, Color.Red);

(Panagiotis - any plans to include a line label property as a standard feature? Would be nice)

PS - actually quite like this:  steps the label in so that it is printed 5% of the way in from the right hand edge

Chart.DrawText("LastBarLowLabel", "Last Bar Low", Chart.FirstVisibleBarIndex+((int)(Chart.MaxVisibleBars*0.95)), Bars.LowPrices.Last(1), Color.Black);
Chart.DrawTrendLine("LastBarLowLine", Bars.Count-2, Bars.LowPrices.Last(1), Chart.FirstVisibleBarIndex+Chart.MaxVisibleBars, Bars.LowPrices.Last(1), Color.Black, 1, LineStyle.Dots);


@couscousmckoy

couscousmckoy
17 Sep 2024, 08:36

RE: Swaps during Backtesting

PanagiotisCharalampous said: 

Hi there,

It uses the current swap rates.

Best regards,

Panagiotis

Thank you.


@couscousmckoy

couscousmckoy
17 Sep 2024, 08:36

RE: Swaps during Backtesting

PanagiotisCharalampous said: 

Hi there,

It uses the current swap rates.

Best regards,

Panagiotis

Thank you.


@couscousmckoy

couscousmckoy
25 May 2023, 16:09

Thanks Pick - I'll give that a try. Part of the problem was length of time it took to scroll through all historical bars to colour code certain bars.  I've managed to irradicate this half of the issue by only updating bar colour on visible bars. Still leaves the 10seconds it takes to calculate which bars should be colour coded and unfortunately to work that out it has to work through a lot of bars from the start.  I'll give threads a go though. Thank you for the help.

couscous


@couscousmckoy

couscousmckoy
25 May 2023, 11:53

Thanks firemyst

Its just a simple one bot instance.

This example exhibits the same behaviour. My question:  why does the static text show after the fake pause and not before it?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class DrawStaticTextExample : Robot
    {

        protected override void OnStart()
        {
            Print("Starting long job");
            Chart.DrawStaticText("LongJobWarning", "Warning: Long Job. Wait until this message disappears!!", VerticalAlignment.Center, HorizontalAlignment.Center,Color.Red);
            
            var WakeUpTime = Server.Time.AddSeconds(10);
            while (WakeUpTime > Server.Time)
            {
            //waste some time
            }
          
            Print("Finished Long Job");
        }
    }
}

 


@couscousmckoy

couscousmckoy
26 May 2022, 10:03

RE: RE: RE:

Hi

Ctrader version:  4.1.19.50832

Live Data

Thanks

 

 


@couscousmckoy

couscousmckoy
25 May 2022, 10:13

RE:

Hi amusleh

Thanks for the prompt response. The entire data set was 434 records long for my test so I removed all the valid BarOpened event logs (even those where there was subsequently a later refire of the same bar).  I've still removed the records that were correct with no subsequent erroneous refire, but here are those records with the original correct event logged plus the subsequent erroneous entry. Look at the log entry times for each pair.

Thanks


@couscousmckoy

couscousmckoy
20 May 2022, 13:57

RE:

Thank you Amusleh. I appreciate you taking the time to reply. I actually decided just to forward the emails on to the second address from Outlook with a rule. But I can see your solution would be successful too.

Marcus

 

amusleh said:

Hi,

It depends on your email server that how many emails it allows you to send on a unit of time (seconds/milliseconds).

To avoid this issue you can place a delay after sending the first email, use Thread.Sleep, example:

            try
            {
                Notifications.SendEmail(EmailAddress1, EmailAddress1, "cTrader 5 Wick Alert", emailmsg);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Invalid email address", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            if (EmailAddress2 != "")
            {
                // 2 seconds delay
                Thread.Sleep(2000);
                // Call refresh data is required after suspending the main thread
                RefreshData();
                
                try
                {
                    Notifications.SendEmail(EmailAddress1, EmailAddress2, "cTrader 5 Wick Alert", emailmsg);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Invalid email address", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

 

 


@couscousmckoy

couscousmckoy
23 Mar 2021, 17:44

RE:

Hi amusleh

Thank you for your response.  Works well. You also made me realise I could also just add "\r\n" into my text string to drop the second number down a line.

Cheers

 

 

amusleh said:

Hi,

Try StringBuilder:

using cAlgo.API;
using System.Text;

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Blank : Indicator
    {
        protected override void Initialize()
        {
            var stringBuilder = new StringBuilder();

            stringBuilder.AppendLine("First Text");
            stringBuilder.AppendLine("Second Text");

            var text = stringBuilder.ToString();

            Chart.DrawText("text", text, Chart.LastVisibleBarIndex, Bars.HighPrices[Chart.LastVisibleBarIndex], Color.Red);
        }

        public override void Calculate(int index)
        {
        }
    }
}

With string builder you can easily add as many line as you want to, and then you just have to call the DrawText once.

You can't use font size, that's for chart controls not chart objects.

 


@couscousmckoy

couscousmckoy
19 Mar 2021, 13:06 ( Updated at: 21 Dec 2023, 09:22 )

RE:

Hi Panagiotis

Maybe its due to monitor resolution? Mine is 1920x1080.

This is with interface scale set to 100%

and to 110%

and to 90%

PanagiotisCharalampous said:

Hi couscousmckoy,

Thanks for your feedback.

 The timeframe label on the tabs of the non selected chart are clipped and not displaying the number part fully.  Can be corrected by setting font zoom / interface scale to 110% in settings - but seems a little strange that zoom=100% (i.e. default) doesn't display correctly. Strangely, setting Zoom to less than 100% also displays fine!

Can you please post some screenshots so that we can see what you are looking at?

Best Regards,

Panagiotis 

Join us on Telegram

 


@couscousmckoy