indicator that changes the color of the candle ....help

Created at 05 Dec 2022, 00:17
WF

wfischerctba

Joined 12.12.2021

indicator that changes the color of the candle ....help
05 Dec 2022, 00:17


Hello.
I have a routine that I use in ProfitChart in Brazil, I want to use it in cTrader, but I don't have the knowledge to do it.
It's quite simple:
At the low of a candle being lower than the last two then it changes the color of the candle, the conditions would be:
Stochastic below 20
I have the code I use on the ProfitChart platform, in case that helps.
Here it was very easy, we have a strategy editor that allows you to easily implement it.
But in cTrdaer it takes a step by step to understand where and how it can be done.

Thanks

If this is not the right place to post, please let me know where I should post it.

Fischer


@wfischerctba
Replies

PanagiotisChar
05 Dec 2022, 09:08

Hi Fischer,

If you need somebody to develop the exact function for you, you can consider posting a Job. If you just need a sample on how to change bar colors, I can provide you one.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us


@PanagiotisChar

wfischerctba
05 Dec 2022, 16:03

RE:

wfischerctba said:

Hello.
I'm not a professional, I'm studying and without financial conditions to invest at the moment, I want to learn how to do small things like that.
But I need a step by step, it's very different from Brazil.
If you can give me a sample of the path I would appreciate it.

Fischer

 


@wfischerctba

PanagiotisChar
06 Dec 2022, 09:31

Hi Fischer,

See below an example on how to change the color of the last bar

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
{
    [Indicator(AccessRights = AccessRights.None, IsOverlay = true)]
    public class NewIndicator : Indicator
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }

        protected override void Initialize()
        {
            Chart.SetBarColor(Bars.Count - 1, Color.Red);
        }

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

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar

wfischerctba
08 Dec 2022, 02:34

RE: RE:

Thank you for your help, I will study and try to do it..

 

 


@wfischerctba