Topics

Forum Topics not found

Replies

cfuorvito@gmail.com
21 Feb 2023, 12:16

RE:

PanagiotisCharalampous said:

Hi willd7781,

Can you please provide the link to the cBot?

Best Regards,

Panagiotis

Bit of an old thread but I believe this is the link to the algo willd7781 presented.

I also cannot get this algo to work properly.  The sl and tp work well in back tests but in live trading are not accurate.


@cfuorvito@gmail.com

cfuorvito@gmail.com
17 Aug 2022, 16:30

RE:

I wouldn't hold your breath, they've been saying for years they are going to add it yet nothing. Great platform otherwise.


@cfuorvito@gmail.com

cfuorvito@gmail.com
12 Dec 2017, 14:52

Good to know you have already implemented Heikin Ashi charts for cTrader Web! I look forward to seeing them on cTrader/cAlgo in the near future.  Many thanks.


@cfuorvito@gmail.com

cfuorvito@gmail.com
11 Dec 2017, 12:16

This would be a brilliant feature as it would smooth out the charts a lot, please add this feature!


@cfuorvito@gmail.com

cfuorvito@gmail.com
22 Sep 2017, 17:01

Hi Panagiotis, thank you for your help.  I will work on it and keep you updated.

Kind regards,

Claud


@cfuorvito@gmail.com

cfuorvito@gmail.com
22 Sep 2017, 15:46

Hi again Panagiotis, thank you for taking the time to help me.  Now when I enter "anotherSeries" intp the MacdCrossOver() function I get 2 build errors.

Error CS1502: The best overloaded method match for 'cAlgo.API.Internals.IIndicatorsAccessor.MacdCrossOver(cAlgo.API.DataSeries, int, int, int)' has some invalid arguments

Error CS1503: Argument 1: cannot convert from 'cAlgo.API.Internals.MarketSeries' to 'cAlgo.API.DataSeries'

Any ideas what I'm doing wrong?

Many thanks

Claud

 

 


@cfuorvito@gmail.com

cfuorvito@gmail.com
22 Sep 2017, 15:25

Hi Panagiotis, thank you for your speedy reply.  I have addapted the algo per your sugestion, however it is still taking the trade based on current time-frame even though the longer time-frame MACD signal is pointing the other direction.  I would be most greatful if you could help me solve this cunundrum.  Many thanks.


@cfuorvito@gmail.com

cfuorvito@gmail.com
22 Sep 2017, 14:48

RE:

lucian said:

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FileSystem)]
    public class MACD : Robot
    {



        [Parameter("Volume", DefaultValue = 1000)]
        public int volume { get; set; }

        [Parameter(DefaultValue = 50, MinValue = 1)]
        public int StopLoss { get; set; }

        [Parameter(DefaultValue = 50, MinValue = 1)]
        public int TakeProfit { get; set; }


        [Parameter("MACD LongCycle", DefaultValue = 26, MinValue = 1)]
        public int LongCycle { get; set; }

        [Parameter("MACD ShortCycle", DefaultValue = 12, MinValue = 1)]
        public int ShortCycle { get; set; }

        [Parameter("MACD Period", DefaultValue = 9, MinValue = 1)]
        public int MACDPeriod { get; set; }

        private MacdCrossOver _MACD;

        protected override void OnStart()
        {

            _MACD = Indicators.MacdCrossOver(LongCycle, ShortCycle, MACDPeriod);

            var anotherSeries = MarketData.GetSeries(AnotherTimeFrame);

            Print("My TimeFrame: {0}, Last high: {1}, Last Low: {2}", TimeFrame, MarketSeries.High.LastValue, MarketSeries.Low.LastValue);
            Print("Another TimeFrame: {0}, Last high: {1}, Last Low: {2}", AnotherTimeFrame, anotherSeries.High.LastValue, anotherSeries.Low.LastValue);
        }

        protected override void OnBar()
        {

            if (_MACD.MACD.Last(1) < _MACD.Signal.Last(1) && _MACD.MACD.Last(0) > _MACD.Signal.Last(0) && _MACD.Signal.Last(0) < 0)
            {
                ExecuteMarketOrder(TradeType.Buy, Symbol, volume, "korakodmy", StopLoss, TakeProfit, 5);
            }

            if (_MACD.MACD.Last(1) > _MACD.Signal.Last(1) && _MACD.MACD.Last(0) < _MACD.Signal.Last(0) && _MACD.Signal.Last(0) > 0)
            {
                ExecuteMarketOrder(TradeType.Sell, Symbol, volume, "korakodmy", StopLoss, TakeProfit, 5);

            }

        }

    }

}

 

I have attepmted to add a higher time frame to korakodmy's MACD crossover algo, for confirmation before a trade is initiated, however the robot is still opening the trade based on the current chart time frame. Can anyone provide some pointers as to how this would be possible?  Many thanks.


@cfuorvito@gmail.com