Topics

Forum Topics not found

Replies

stajefala
24 Nov 2018, 14:45

RE: RE: RE: RE: RE:

Panagiotis Charalampous said:

Hi stajefala,

The behavior you describe is not intentional and we are trying to reproduce the issue. If you can, please post a screenshot with the color settings of the object and how it looks on your chart.

Best Regards,

Panagiotis

stajefala said:

bart1 said:

stajefala said:

Sorry but i have no idea on how to build, i just tried building it for 30mins.. could not figure it out.

  1. Go to Automate
  2. Create new cBot
  3. Replace all the text in code editor with example from above
  4. Build it

Then you can add this cBot to the chart with transparent objects and run it. Logs will have some info:
22/11/2018 15:51:47.321 | cBot "New cBot" was started successfully for EURUSD, h1.
22/11/2018 15:51:47.477 | 3 objects on the chart
22/11/2018 15:51:47.477 | 2 objects with transparent color
22/11/2018 15:51:47.477 | Colors fixed

 

Never mind, the objects are "semi transparent" this code only changes if its fully transparent.. not the first time a cTrader update has caused so much pain!
I´ll just refix everything manually.

It´s just strange that cTrader decides to change and fiddle automatically with colors/transparency and other stuff, most of my London ranges are out of place and not at all at the london H/L

 

I managed to fix the color scheme thanks to a member here, but all my technical analysis i do manually is at the wrong places.. i do a kind of Harmonic pattern.. which consists of Boxes/Rectangles/Triangles, fibonnaci.. i wont be posting a screenshot of my work (i´d like to keep it somewhat annonymous)

But all in all, a whole years worth of analysis/harmonic patterns across 25 markets have essentially been damaged.. where its worthless now.. 
I really fear for another update like this.. i really fear putting in 1,000+hours of work in.. just for it to be useless when cTrader 3.5 comes out
 


@stajefala

stajefala
23 Nov 2018, 20:21

RE: RE: RE: RE: RE:

bart1 said:

stajefala said:

Never mind, the objects are "semi transparent" this code only changes if its fully transparent.. not the first time a cTrader update has caused so much pain!
I´ll just refix everything manually.

For semi transparent objects you can change line 17 to

var transparentObjects = Chart.Objects.Where(o => GetObjectColor(o).A < 255).ToList();

You need to run this cBot on every chart where you have transparent objects.

Super! Thanks!!! it worked :-)


@stajefala

stajefala
22 Nov 2018, 19:05

RE: RE: RE:

bart1 said:

stajefala said:

Sorry but i have no idea on how to build, i just tried building it for 30mins.. could not figure it out.

  1. Go to Automate
  2. Create new cBot
  3. Replace all the text in code editor with example from above
  4. Build it

Then you can add this cBot to the chart with transparent objects and run it. Logs will have some info:
22/11/2018 15:51:47.321 | cBot "New cBot" was started successfully for EURUSD, h1.
22/11/2018 15:51:47.477 | 3 objects on the chart
22/11/2018 15:51:47.477 | 2 objects with transparent color
22/11/2018 15:51:47.477 | Colors fixed

 

Never mind, the objects are "semi transparent" this code only changes if its fully transparent.. not the first time a cTrader update has caused so much pain!
I´ll just refix everything manually.

It´s just strange that cTrader decides to change and fiddle automatically with colors/transparency and other stuff, most of my London ranges are out of place and not at all at the london H/L


@stajefala

stajefala
22 Nov 2018, 19:00

RE: RE: RE:

bart1 said:

stajefala said:

Sorry but i have no idea on how to build, i just tried building it for 30mins.. could not figure it out.

  1. Go to Automate
  2. Create new cBot
  3. Replace all the text in code editor with example from above
  4. Build it

Then you can add this cBot to the chart with transparent objects and run it. Logs will have some info:
22/11/2018 15:51:47.321 | cBot "New cBot" was started successfully for EURUSD, h1.
22/11/2018 15:51:47.477 | 3 objects on the chart
22/11/2018 15:51:47.477 | 2 objects with transparent color
22/11/2018 15:51:47.477 | Colors fixed

 

It worked in "automate" but not on existing workspace


@stajefala

stajefala
22 Nov 2018, 18:55

Thanks, but still did not work! i built it and pressed play.. did not change anything im sorry to say.

 


@stajefala

stajefala
22 Nov 2018, 18:20

RE:

bart1 said:

Try this code, it changes alpha channel for all transparent chart objects from 0 to 255:

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

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class NewcBot : Robot
    {
        protected override void OnStart()
        {
            Print("{0} objects on the chart", Chart.Objects.Count);
            var transparentObjects = Chart.Objects.Where(o => GetObjectColor(o).A == 0).ToList();
            Print("{0} objects with transparent color", transparentObjects.Count);
            if (transparentObjects.Any())
            {
                FixTransparentObjects(transparentObjects);
                Print("Colors fixed");
            }
            Stop();
        }

        private void FixTransparentObjects(List<ChartObject> transparentObjects)
        {
            foreach (var obj in transparentObjects)
            {
                var transparentColor = GetObjectColor(obj);
                var normalColor = Color.FromArgb(255, transparentColor);
                SetObjectColor(obj, normalColor);
            }
        }

        private Color GetObjectColor(ChartObject obj)
        {
            return (Color)obj.GetType().GetProperty("Color").GetValue(obj, null);
        }

        private void SetObjectColor(ChartObject obj, Color color)
        {
            obj.GetType().GetProperty("Color").SetValue(obj, color, null);
        }
    }
}

 

Sorry but i have no idea on how to build, i just tried building it for 30mins.. could not figure it out.


@stajefala

stajefala
22 Nov 2018, 17:22

Yep, Same problem here.. all my previous placed Fibonaccis/London session boxes (Rectangle)/Trendlines everything changed to "transparent", instead of sticking to the original(Full color)
Why would an update change all technical analysis to "transparent" , i can´t even see my own work!


@stajefala