Replies

phaniophrero
28 Dec 2022, 20:53 ( Updated at: 29 Dec 2022, 00:42 )

RE: This is what I want it to look like

PanagiotisChar said:

Hi there,

You need to use a different name for each icon else it overrides the previous one.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

Hi, I want to make this indicator look like this UT-Bot Indicator from TradingView : 

https://www.tradingview.com/script/n8ss8BID-UT-Bot-Alerts/

Could you tell me how can I manage to do that ?

Thankyou !


@phaniophrero

phaniophrero
27 Dec 2022, 13:55

RE:

PanagiotisChar said:

Hi there,

You need to use a different name for each icon else it overrides the previous one.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

Hi, well I think I'm using different names for each icon, one is called Buy, and the other one is Sell, or what do you mean?


@phaniophrero

phaniophrero
25 Dec 2022, 22:28

RE:

phaniophrero said:

Hi, I'm trying trying to display icon or text with buy and sell signal on candlestick chart based on UT Bot indicator but I'm not really managing to display the text or icon on the chart ,

so this is what I have by now :

 

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;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class UTBotCA23 : Indicator
    {
        [Parameter("Key", DefaultValue = 1)]
        public double Key_Value { get; set; }
        [Parameter("ATR Period", DefaultValue = 10)]
        public int ATR_Period { get; set; }
 
        private AverageTrueRange xATR;
        
 
        //[Output("UpTrend", PlotType = PlotType.DiscontinuousLine, LineColor = "Green")]
        public IndicatorDataSeries XATRTrailingStopGreen { get; set; }
        //[Output("Continuos", PlotType = PlotType.DiscontinuousLine, LineColor = "Green")]
        public IndicatorDataSeries XATRTrailingStop { get; set; }
        //[Output("DownTrend", PlotType = PlotType.DiscontinuousLine, LineColor = "Red")]
        public IndicatorDataSeries XATRTrailingStopRed { get; set; }
 
        protected override void Initialize()
        {
            xATR = Indicators.AverageTrueRange(ATR_Period, MovingAverageType.Exponential);
            
            
        }
 
        public override void Calculate(int index)
        {
            double nLoss = Key_Value * xATR.Result[index];
            XATRTrailingStop[index] = (Bars.ClosePrices[index] > XATRTrailingStop[index - 1] && Bars.ClosePrices[index - 1] > XATRTrailingStop[index - 1]) ? Math.Max(XATRTrailingStop[index - 1], Bars.ClosePrices[index] - nLoss) : (Bars.ClosePrices[index] < XATRTrailingStop[index - 1] && Bars.ClosePrices[index - 1] < XATRTrailingStop[index - 1]) ? Math.Min(XATRTrailingStop[index - 1], Bars.ClosePrices[index] + nLoss) : (Bars.ClosePrices[index] > XATRTrailingStop[index - 1]) ? Bars.ClosePrices[index] - nLoss : Bars.ClosePrices[index] + nLoss;
            XATRTrailingStopGreen[index] = XATRTrailingStop[index] < Bars.ClosePrices[index] ? XATRTrailingStop[index] : double.NaN;
            XATRTrailingStopRed[index] = XATRTrailingStop[index] > Bars.ClosePrices[index] ? XATRTrailingStop[index] : double.NaN;
            
          
            Chart.DrawIcon("Buy", ChartIconType.UpTriangle, Bars.OpenTimes.LastValue, XATRTrailingStopGreen[index] , Color.Green);
            
             Chart.DrawIcon("Sell", ChartIconType.DownTriangle, Bars.OpenTimes.LastValue, XATRTrailingStopRed[index] , Color.Red);
        }
    }
}

 

Quick update , so it actually shows the icon if I uncomment those 3 outputs at the top , but it's showing a single icon for the last Uptrend , and I want to show the icons for past candles as well and also I'd like to get rid of the lines and only show the icons , how can i do that ?


@phaniophrero

phaniophrero
13 Dec 2022, 13:24

RE:

Spotware said:

Dear trader.

The video does not provide any useful information unfortunately.

Best regards,

cTrader Team

 

Hi , I just tried to use the indicator with other laptops and PCs and is working fine , so only this new PC with Windows 11 fresh install has this problem , could this be because of the CPU ? I mean all laptops that I've tried with have Intel CPU , but this PC that doesn't work has Ryzen CPU.

I don't know if that could be the problem , but this has nothing to do with the source code of the indicator since it's working fine on other laptops too.

What could be the problem of this PC why is getting this Suspended error even with the default indicators from cTrader not only with custom indicators ?


@phaniophrero

phaniophrero
12 Dec 2022, 21:56

RE:

Spotware said:

Dear trader.

You can send it to us to community@ctrader.com

Best regards,

cTrader Team

 

Hi , can you please take a look at this video to see what's wrong ? I also get this Suspended error even with the default indicators that cTrader comes with ...

 


@phaniophrero

phaniophrero
09 Dec 2022, 17:34

RE:

Spotware said:

Dear trader.

In order for us to investigate further, we need the requested information.

Best regards,

cTrader Team

Hi , do you have a private place where I can send you the source code ?


@phaniophrero

phaniophrero
08 Dec 2022, 18:41

RE:

Spotware said:

Dear trader.

In order for us to investigate further, we need the requested information.

Best regards,

cTrader Team

The source code has nothing to do with this, did you understand what I described in the first message? The Indicator works fine if a user is installing it on a single laptop or PC, but if someone is trying to use the same trading account and install this indicator on two or more laptops or PCs there is where the problem/error with "Suspended" shows.

So I don't want to share the source code here and make it public.

 

How can I debug this if the cTrader desktop app is not showing or creating the logs, or actually displaying some more information about this suspended error ?

 


@phaniophrero

phaniophrero
07 Dec 2022, 17:13

RE:

Spotware said:

Dear trader.

Thanks for reporting this issue. Please provide us with the indicator source code and the next time this happens, please send us some troubleshooting information. Please also paste a link to this discussion inside the troubleshooting description.

Best regards,

cTrader Team

He has a new PC with Windows 11 fresh installed, could this be because of some plugins or some drivers that are missing ?

So as I said before he installed the indicator on his laptop and is working, but on his PC ( so another device ) and also using the same account on both laptop and PC, and he is not getting the error logs in his folders, so how can we know what is causing this if we don't have something that tells us where is the problem?

 


@phaniophrero

phaniophrero
05 Dec 2022, 17:28

RE:

PanagiotisChar said:

Hi there,

There is no such option at the moment.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

I see that's too bad.

Anyways thanks for the response.


@phaniophrero

phaniophrero
02 Dec 2022, 23:57

Ability to turn off / turn on indicator

Hi , I'm too interested in this feature , is this available now ? and as well could we do a turn on / turn off on a [Cloud("Cloud Top", "Cloud Bottom" , FirstColor="White", Opacity=0.3 , SecondColor = "Blue")] ? For now I have this cloud inside my indicator but I can't turn it off if I want to , and I'd really like to have this functionality.

 

Thanks.


@phaniophrero