Ctrader version 4.7.9 bug
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
Replies
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.
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.
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
firemyst
01 May 2023, 02:38
So have you looked in the "logging" tab to see what errors (if any) are displayed?
@firemyst