Topics
Replies
PanagiotisCharalampous
11 Aug 2020, 09:22
Hi tasr1r1,
Can you please check if a workspace is selected? Can you try changing workspaces and let us know if it becomes enabled?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 08:07
Hi samuel.jus.cornelio,
You can use the HasCrossedAbove and HasCrossedBelow methods.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 08:01
Hi johanlo,
Can you please write your post in English?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 07:54
Hi samuelbreezey,
Shouldn't you use totalPipsB instead of slPriceB here?
ExecuteMarketOrder(TradeType.Buy, SymbolName, exactVolumeB, InstanceName, slPriceB, tpPrice);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 07:49
Hi koktos632,
It is not considered a bug. This is how it is designed to work. When more than one bars are created in one tick, then only one OnBar() event will be triggered. We will consider updating the documentation.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 07:46
Hi ergun,
You need to be more specific with the issue. Can you provide us with the indicator code that will allow us to reproduce this behavior?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 07:44
Hi ergun,
I am not sure why do you expect different profits. Leverage has nothing to do with it. If you trade with the same volume, you will get the same results.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 07:42
Hi samuel.jus.cornelio,
You need to change your conditions accordingly e.g.
if (_Ema1.Result.LastValue > Symbol.Bid)
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 17:21
Hi samuel.jus.cornelio,
So you need to check if the price is above or below the EMA accordingly and not if it is equal.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 17:06
Hi samuel.jus.cornelio,
It is very rare the EMA to become equal to the price. You need to rethink your logic. Maybe your intentions are different to what you have written.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 15:07
RE:
Hi samuel.jus.cornelio,
See an example below
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewcBot : Robot
{
ExponentialMovingAverage _ema;
protected override void OnStart()
{
_ema = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 14);
}
protected override void OnTick()
{
if (_ema.Result.LastValue == Symbol.Bid)
{
// Execute trade
}
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 14:37
Hi koktos632,
I checked this with the development team and indeed the expected behavior is that OnBar() is called only once and not 21 times as I mentioned above.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 12:00
Hi findseun08,
We do not have an ETA for this unfortunately.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 10:09
Hi Nanaos,
Can you try adding more than one lines to the data?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 08:26
Hi findseun08,
Can you please explain what do you mean? What method are you looking for?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 08:23
Hi findseun08,
There is no difference in coding for renko charts. It is the same as for time based charts. What examples are you looking for?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 08:21
Hi ergun,
When backtesting, the cBot will use the leverage of the selected account. Can you please explain why do you think this is not the case?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 08:16
Hi Nanaos,
Can you please provide more information about the problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Aug 2020, 08:15
( Updated at: 21 Dec 2023, 09:22 )
Hi Nanaos,
Here it is. The link is provided within the Backtesting settings.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Aug 2020, 10:53
Hi viesisz89,
This is already possible in cTrader 3.8.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous