Replies

Cwebhook
18 Dec 2024, 16:49 ( Updated at: 19 Dec 2024, 06:48 )

My new web app might suit your needs: https://cwebhook.com


@Cwebhook

Cwebhook
16 Dec 2024, 11:32 ( Updated at: 17 Dec 2024, 07:44 )

Have a look at my new web app https://cwebhook.com it does exactly what you describe, also it is hosted in the same data centre TradingView use so trades get placed very fast.


@Cwebhook

Cwebhook
16 Dec 2024, 11:27 ( Updated at: 17 Dec 2024, 07:44 )

Hello,

Have a look at my new web app https://cwebhook.com it does exactly what you've described.

Cheers


@Cwebhook

Cwebhook
16 Dec 2024, 11:19 ( Updated at: 17 Dec 2024, 07:44 )

Hello,

That is the exact usecase I needed personally, as an accomplished web dev I decided to build my own solution ‘Cwebhook’ based on the cTrader Open API, you can find out more about the service here: https://cwebhook.com it will work with any TradingView indicator that uses an alertcondition function.

Hope that helps.


@Cwebhook

Cwebhook
10 Jan 2024, 12:56

RE: Using candle body range as source for SimpleMovingAverage

ctrader.guru said: 

I think I understand, you don't need to manipulate the SMA, you can recreate it, this is a simple example:

using System;using cAlgo.API;using cAlgo.API.Internals;namespace cAlgo{    [Indicator(IsOverlay = false, AccessRights = AccessRights.None)]    [Levels(0.0005)]    public class BodySMA : Indicator    {        [Parameter("Period", DefaultValue = 10, MinValue = 2)]        public int Period { get; set; }        [Output("Average", LineColor = "DodgerBlue")]        public IndicatorDataSeries Average { get; set; }        protected override void Initialize()        {                        // TODO        }        public override void Calculate(int index)        {            if (index < Period) return;            double sum = 0;            for (int i = index - Period + 1; i <= index; i++)            {                sum += Math.Abs( Bars.ClosePrices[i] - Bars.OpenPrices[i]);                        }                        Average[index] = Math.Round( sum / Period, Symbol.Digits);        }    }}

Thank you! that is what I was after.


@Cwebhook

Cwebhook
05 Jan 2024, 14:31 ( Updated at: 06 Jan 2024, 08:16 )

RE: Using candle body range as source for SimpleMovingAverage

ctrader.guru said: 

I'm not sure what you want to do, but start with this approach, if you explain better what you want to achieve I can help you better

 

using cAlgo.API;using cAlgo.API.Indicators;using System;namespace cAlgo{    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]    public class test : Indicator    {        protected override void Initialize()        {            SimpleMovingAverage sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 100);            double  body = Math.Abs(Bars.ClosePrices.Last(0) - Bars.OpenPrices.Last(0));            double body_sma = sma.Result.Last(0) * 3.0;                    }        public override void Calculate(int index)        {                    }            }    }

 

Thanks for the reply.

The body var returns a pip value of the current candle, in tradingview that pip value is passed directly to the sma function which then returns an average pip value, for example if I log the output to the data window these are those 2 values, which are changing in realtime with tick data. I'm trying to achieve the same in ctrader but no idea how to.

 

 


@Cwebhook