Ctrader version 4.7.9 bug

Created at 30 Apr 2023, 15:59
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
EL

eliezer_barros

Joined 21.12.2018

Ctrader version 4.7.9 bug
30 Apr 2023, 15:59


Hi

I installed the version 4.7.9 and my cbot is not working, but in another pc version 4.6.6 is working accordingly.

What the differences or bug notes?

Tks

Eli


@eliezer_barros
Replies

firemyst
01 May 2023, 02:38

So have you looked in the "logging" tab to see what errors (if any) are displayed?


@firemyst

PanagiotisChar
02 May 2023, 08:12

Hi there,

In order to get assistance, you need to share your source code and let us know what the exact problems are.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar

eliezer_barros
02 May 2023, 14:52 ( Updated at: 21 Dec 2023, 09:23 )

RE: bug example

PanagiotisChar said:

Hi there,

In order to get assistance, you need to share your source code and let us know what the exact problems are.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

This is the error, just it

 

You ask me for the source....so please see below

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.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class ThreeWhiteSoldiersandThreeBlackCrows : Robot
    {
        [Parameter(DefaultValue = 1000)]
        public double Volume { get; set; }
        
        [Parameter(DefaultValue = 10)]
        public double TakeProfit { get; set; }
        
         [Parameter(DefaultValue = 10)]
        public double StopLoss { get; set; }

           
        protected override void OnBar()
        {
        //Three White Soldiers
        if(Bars.ClosePrices.Last(1) > Bars.OpenPrices.Last(1) 
        && Bars.ClosePrices.Last(2) > Bars.OpenPrices.Last(2) 
        && Bars.ClosePrices.Last(3) > Bars.OpenPrices.Last(3))
        
        {
        ExecuteMarketOrder(TradeType.Buy, SymbolName, Volume, "", StopLoss, TakeProfit);
        }

        //Three Black Crows
        if(Bars.ClosePrices.Last(1) < Bars.OpenPrices.Last(1) 
        && Bars.ClosePrices.Last(2) < Bars.OpenPrices.Last(2) 
        && Bars.ClosePrices.Last(3) < Bars.OpenPrices.Last(3))
        
        {
        ExecuteMarketOrder(TradeType.Sell, SymbolName, Volume, "", StopLoss, TakeProfit);
        }
}
        
    }
}

 


@eliezer_barros