Topics
Replies
aazimi3731
14 Sep 2024, 14:47
( Updated at: 14 Sep 2024, 14:50 )
RE: A simple Indicator needs Full Access
PanagiotisCharalampous said:
Hi there,
I have set AccessRights to none and I have no problem. Can you record a video demonstrating what you are doing?
Best regards,
Panagiotis
Hi.
How can I send you the video?
This message area accepts only a URL.
Can I put it in a telegram message?
Thank you.
Regards.
@aazimi3731
aazimi3731
14 Sep 2024, 10:15
( Updated at: 14 Sep 2024, 12:32 )
RE: A simple Indicator needs Full Access
PanagiotisCharalampous said:
Hi there,
Please share your indicator's code so that we can check.
Best regards,
Panagiotis
Hi.
Here is my indicator's code:
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.EasternStandardTime, AccessRights = AccessRights.FullAccess)]
public class TestIndicator : Indicator
{
[Parameter("Source")]
public DataSeries Source { get; set; }
[Parameter("Period", DefaultValue = 14, MinValue = 2)]
public int Period { get; set; }
[Parameter("Message", DefaultValue = "Hello world!")]
public string Message { get; set; }
[Output("Main", LineColor = "Lime", PlotType = PlotType.Line)]
public IndicatorDataSeries Result { get; set; }
protected override void Initialize()
{
// To learn more about cTrader Automate visit our Help Center:
// https://help.ctrader.com/ctrader-automate
Print(Message);
}
public override void Calculate(int index)
{
var sum = 0.0;
for(var i = index - Period + 1; i <= index; i++)
{
sum += Source[i];
}
Result[index] = sum/Period;
}
}
}
Thank you.
@aazimi3731
aazimi3731
15 Sep 2024, 16:21
RE: RE: RE: A simple Indicator needs Full Access
PanagiotisCharalampous said:
Hi.
I have sent the video.
Please let me know it shows the problem clearly.
Thank you.
Regards,
Aziz
@aazimi3731