Topics
30 Aug 2024, 11:09
 0
 338
 0
15 Aug 2024, 13:12
 0
 336
 0
23 Jul 2024, 17:30
 0
 418
 0
02 Jun 2024, 00:49
 2
 586
 3
14 Apr 2024, 00:05
 596
 4
15 Jan 2024, 06:08
 680
 3
Replies

Waxy
19 Mar 2019, 07:57

I think maybe adding these parameters to IndicatorDataSeries would a better option, reflection shouldn't be used for this in my opinion, and also is not enough because it doesn't get the values if they are changed.

Please consider fixing this for 3.6

Thanks for your support


@Waxy

Waxy
14 Mar 2019, 22:28

I would like to clear out some items in this post, cTrader 3.5 has been good, so far.
 

1.       Give us the option to make folders for indicators/cbots

2.       Improve performance of cBots/Indicators list (Too slow to load when you have many indicators, it often freezes)

3.       Let us pic Font Size and Bold type for Drawing Text

4.       Give more ZoomIn/ZoomOut options for the chart, a couple more up and down.

5.       Allow the Indicators to print and send info to the log (in Trader mode this doesn't work)

6.       Allow a DeInitialization for Indicators, or programmatic removal.

7.       Let Indicators access other indicator chart objects, just like you let us any bot access any other bot trades, so I think this should be consistent, currently if I try to find an object like a rectangle made from another indicator, it's out of reach.

8.       Allow for other Static Objects like StaticText, i.e. StaticRectangle, or better yet:

1.       Give (x,y) coordinates to chart area so we can set up specific locations and not just VerticalAlignment/HorizontalAlignment, the current API based on barIndex and price is Ok and serves for some scenarios, but it fails and I have to make it update itself when the chart is scrolled, so an (x,y) static option is really needed.

9.       Parameter Inputs for all default enums in the API, also for the new Color class, and custom enums, I know this is under development currently.

1.       Color (Which is a class currently)

2.       LineStyle

3.       Custom Enums

4.       TradeType

5.       PlotType

6.       And others

10.    If it's possible, allow us to run multiple timers in parallel, and not just one.

11.    Loading multiple symbol data takes too long, I would like to use Parallel.Foreach() to retrieve other MarketSeries faster but it's not allowed, it throws an error.

12.    Allow Change Chart/Open a new Chart on click.

13.    API able to retrieve all symbols allowed by the platform.

14.    A better MarketHours property, on which you can filter sessions like London, New York, etc (This is already visible on the bottom left of the platform)


@Waxy

Waxy
13 Mar 2019, 13:15

Hello Panagiotis,

Thanks for your support, please make this a feature in the future, I need to update object colors from the settings picked by the user with Output Attribute.

Best Regards,


@Waxy

Waxy
13 Mar 2019, 05:44

Hello

As far as I know, this only works inside the Automate Section.


@Waxy

Waxy
12 Mar 2019, 19:48

Hello Panagiotis,

This may get the default color specified using LineColor = Color, however, if the user changes the color or line-style this is not possible to retrieve, it should be able to get the properties the user has changed, not the one hard coded, I think this is a bug.

The code below prints Red despite I'm changing it to various colors.

Thanks for your support,

using System;
using System.Reflection;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ReadOutputAttribute : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        [Output("Main", LineColor = "Red")]
        public IndicatorDataSeries Result { get; set; }

        Color _myColor;

        protected override void Initialize()
        {

        }

        public override void Calculate(int index)
        {
            PropertyInfo[] props = typeof(ReadOutputAttribute).GetProperties();

            foreach (PropertyInfo prop in props)
            {
                object[] attrs = prop.GetCustomAttributes(true);
                foreach (object attr in attrs)
                {
                    OutputAttribute outputAttr = attr as OutputAttribute;
                    if (outputAttr != null)
                    {
                        if (outputAttr.LineColor != null)
                        {
                            Print(outputAttr.LineColor.ToString());
                            _myColor = Color.FromName(outputAttr.LineColor.ToLower());
                        }
                        else
                            Print("Line Color is null");
                    }
                }
            }

            Chart.DrawStaticText("Text", "This text changes color", VerticalAlignment.Top, HorizontalAlignment.Right,
                _myColor);
        }
    }
}



 


@Waxy

Waxy
07 Mar 2019, 07:01

Thanks for your hard work Spotware,

I have questions,

Why this feature works with custom enums being parametrizable, but not built-in enums like HorizontalAlignment, and others? I hope is available soon also.
Note: Currently I can build a custom enum and then cast to a built-in enum, that's what I can do for now.

Also, will you wait for 3.6 before launching 3.5 as the official version?

Thank you

 


@Waxy

Waxy
13 Nov 2018, 02:08

Hello Panagiotis,

Sadly, the problem just faded away without any explanation, tho I did re-install cTrader and Visual Studio, the issue persisted. It suddenly it works now, how odd, I must have done something, or the software must have received an update.

It didn't have anything to do with custom robots, because it was occurring even with a new bot with a default code.

I'll use this topic if the issue shows up again in the future.


Thanks for your support,


@Waxy

Waxy
10 Nov 2018, 04:23

Also having this message from Migration Report
 

New cBot (3)\New cBot (3).csproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=DD87C1B2-3799-4CA2-93B6-5288EE928820

@Waxy

Waxy
06 Sep 2018, 20:25

Hello Panagiotis, 

Thanks for your response, hope Spotware changes its mind in the future, I think this is a good feature to have, a good example would be what Microsoft does with Visual Studio

Best Regards,


@Waxy

Waxy
23 Jul 2018, 22:01

Hello Spotware,

This looks great and will help us develop better tools for trades.

I have two requests I haven't seen but been asking for it.

  1. Opacity for objects, this is important because chart data is sometimes blocked by these objects.
  2. Have an option to have objects drawn on backtests, but interactivity disabled.

Thanks for your continuous work.


@Waxy

Waxy
07 Jul 2018, 16:18

All you had to do is to change "Buy" for "Sell" and update the price to have both

For Buy

//If there is not a buystop order place a buy stop order
if (PendingOrders.Count(item => item.OrderType == PendingOrderType.Stop && item.TradeType == TradeType.Buy) == 0)
{
    PlaceStopOrder(TradeType.Buy, Symbol, 1000, Symbol.Ask + 100 * Symbol.PipSize);
}

 

For Sell

//If there is not a buystop order place a buy stop order
if (PendingOrders.Count(item => item.OrderType == PendingOrderType.Stop && item.TradeType == TradeType.Sell) == 0)
{
    PlaceStopOrder(TradeType.Sell, Symbol, 1000, Symbol.Bid - 100 * Symbol.PipSize);
}

 


@Waxy

Waxy
02 Jul 2018, 07:46

	double[] d = new double[] {1,2,3,4,5};
	float[] f = d.Select(x => (float)x).ToArray();

 


@Waxy

Waxy
01 Jul 2018, 07:37

Did you set the same code for sell orders?

It would be better if you share the code.


@Waxy

Waxy
29 Jun 2018, 09:54

Just replace SimpleMovingAverage for WeightedMovingAverage


@Waxy

Waxy
29 Jun 2018, 09:17

Here's a simple example:

 

using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Examples : Robot
    {
        SimpleMovingAverage SlowMA, FastMA;
        Position Pos;

        protected override void OnStart()
        {
            SlowMA = Indicators.SimpleMovingAverage(MarketSeries.Close, 100);
            FastMA = Indicators.SimpleMovingAverage(MarketSeries.Close, 50);
        }

        protected override void OnBar()
        {
            bool direction = FastMA.Result.Last(1) > SlowMA.Result.Last(1);
            TradeType tT = direction ? TradeType.Buy : TradeType.Sell;

            if (Positions.Count == 0)
            {
                Pos = ExecuteMarketOrder(tT, Symbol, 1000).Position;
            }
            else
            {
                if((Pos.TradeType == TradeType.Buy && !direction) || (Pos.TradeType == TradeType.Sell && direction))
                    ClosePosition(Pos);
            }
        }
    }
}

 


@Waxy

Waxy
29 Jun 2018, 08:59

            //If there is not a buystop order place a buy stop order
            if (PendingOrders.Count(item => item.OrderType == PendingOrderType.Stop && item.TradeType == TradeType.Buy) == 0)
            {
                PlaceStopOrder(TradeType.Buy, Symbol, 1000, Symbol.Ask + 100 * Symbol.PipSize);
            }

 


@Waxy

Waxy
20 Jun 2018, 13:35

Could you please give me a mail? or should I send it to support?


@Waxy

Waxy
01 Jun 2018, 02:05

I think the last update fixed it :)


@Waxy

Waxy
01 Jun 2018, 02:04 ( Updated at: 21 Dec 2023, 09:20 )

Hello Panagiotis,

The error is shown when I build from VS2017:

In the end, it says: Process doesn't have access to file because it's being used by another process.

I must close VS and click Build on cTrader for these errors to become warnings, I think it's a bug.

Now without VS2017 Open:


@Waxy

Waxy
31 May 2018, 22:29

Sure Panagiotis, I'll send a video about it.


Thanks for your support.


@Waxy