
Topics
Replies
PanagiotisCharalampous
11 Nov 2020, 15:24
Hi samuel.jus.cornelio,
Here is an example
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
{
[Parameter(DefaultValue = 0.5)]
public double Deviation { get; set; }
[Parameter("% Retracement", DefaultValue = 38.2)]
public double per { get; set; }
NewIndicator _indicator;
protected override void OnStart()
{
_indicator = Indicators.GetIndicator<NewIndicator>(Deviation, per);
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 14:37
Hi Lisa,
In order to help you further, you need to provide me with the complete cBot code.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 13:51
Hi Lisa,
The parameter values displayed in the cBot parameters panel are not updated if they are changed from within the code.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 13:49
Hi lamaramohamedramdane,
You can find many here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 11:20
Hi avoidlost,
The absolute P&L is not so relevant. ROI is calculated on intervals of 15 mins and takes into consideration equity drawdown. It seems that you have had a significant drawdown on the 9th of November which was reflected in your ROI. Even though your trades might have recovered and helped in your total P&L to be positive, this affected your ROI negatively.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 09:37
Hi avoidlost,
Here is how the ROI is calculated. Regarding the information that is not displayed the team is looking into it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 09:24
Hi matt92,
Templates do not save drawings.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 09:18
Hi lamaramohamedramdane,
The strategy cannot accept more followers from your broker.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 09:17
Hi xiao-linlong,
Your post does not seem to be related with Open API. Can you please use the correct forum section for your post?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2020, 09:12
Hi samuel.jus.cornelio,
I am sorry but I am not sure what do you need. I provided an example above. Here it is again
var tradingStarts = TimeSpan.ParseExact("17:00", "hh\\:mm", null);
var tradingStops = TimeSpan.ParseExact("18:00", "hh\\:mm", null);
if (Server.Time.TimeOfDay >= tradingStarts && Server.Time.TimeOfDay < tradingStops)
{
// trade
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 16:08
Hi tradermatrix,
Here you go
SL = Math.Round(ATR.Result.LastValue * ATRfactor / Symbol.PipSize, 1);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 16:03
Hi Sergey,
Here is their website https://www.theunitedtrading.com/en/
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 14:18
Hi Sergey,
You need to ask your broker to delete your cTrader ID and accounts.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 14:15
Hi mgpublic,
You can use conditions in your Count() method like below
if (Positions.Count(x => x.SymbolName == "AUDUSD") < 5)
{
// Do something
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 14:13
Hi tradermatrix,
You should round the stop loss value to one decimal place before using it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 08:25
Hi lym1609,
Please use the Suggestions section for your suggestions.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 08:22
Hi SmartArtsStudio,
Check this indicator.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 08:19
Hi lec0456,
What I meant is to have a boolean parameter and use it to determine if these data series will be assigned values
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewIndicator : Indicator
{
[Parameter(DefaultValue = true)]
public bool ShowResult { get; set; }
[Output("Main")]
public IndicatorDataSeries Result { get; set; }
protected override void Initialize()
{
// Initialize and create nested indicators
}
public override void Calculate(int index)
{
// Calculate value at specified index
if (ShowResult)
Result[index] = 1;
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2020, 08:14
Hi shpendbaftiu,
Please let us know the broker and the symbol.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2020, 14:54
Hi paoloduco,
You need to provide us with some more information about this problem e.g. what is the exact problem. some screenshots and/or a video.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous