
Topics
Replies
PanagiotisCharalampous
13 Apr 2020, 16:33
Hi einrel.lernie,
You can check the Maximum and Minimum methods.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 14:11
Hi Tj11,
Can you please explain to us what is the problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 12:38
Hi Sebastijan,
No this is not possible. You should consider other ways of saving your connection strings.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 11:44
Hi there,
Check the example below
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator("test", IsOverlay = true, AccessRights = AccessRights.None)]
public class test : Indicator
{
[Parameter("Offset (Pips)", DefaultValue = 5)]
public int Offset { get; set; }
protected override void Initialize()
{
}
public override void Calculate(int index)
{
Chart.DrawVerticalLine("line 9", index - 8, Color.Gray, 1, LineStyle.LinesDots);
Chart.DrawVerticalLine("line 17", index - 16, Color.Gray, 1, LineStyle.LinesDots);
Chart.DrawText("9", "9", index - 8, Chart.BottomY + (Symbol.PipSize * Offset), Color.White);
Chart.DrawText("17", "17", index - 16, Chart.BottomY + (Symbol.PipSize * Offset), Color.White);
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 09:11
Hi systemtradingvn02,
If you need somebody to develop the indicator for you, you can consider posting a Job or contact a Consultant.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 09:06
Hi mahnas2869,
You can get both Bid and Ask prices in backtesting, hence you can calculate the spread as well. See 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
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
protected override void OnStart()
{
// Put your initialization logic here
}
protected override void OnTick()
{
Print("Ask: " + Symbol.Ask);
Print("Bid: " + Symbol.Bid);
Print("Spread: " + Math.Round(Symbol.Ask - Symbol.Bid, Symbol.Digits));
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:56
Hi contact.bitq,
You need to explain more clearly what do you mean when you say they do not work. What did you expect to happen and what happens instead? Also please provide the complete indicator code.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:53
Hi bewell,
There is no such option at the moment. We will add it in a future release.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:52
Hi Peter,
This is how it works by design. A workspace is not only about chart but many other settings as well. Web technologies are fundamentally different than desktop technologies so differences in behavior should be expected.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:45
Hi nhatitp,
There is no such option at the moment but it is in our plans for future releases.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:44
Hi andresort28,
Can you please post the indicator code and let us know which broker you use?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:42
Hi lohzi97,
It still works the same way.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:40
Hi 3AFX,
If you need somebody to develop an indicator for you, you can consider posting a Job or contacting a Consultant.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:38
Hi nguyendan81985,
You can use DrawText() method to draw text on a place on the chart.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:35
Hi travkinsm1,
You need to reach out to the indicator developer. He knows better than anybody else how his indicator should work and how to fix this behavior.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Apr 2020, 08:33
Hi there,
Can you explain you us what do you mean? Did you talk to IC Markets?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Apr 2020, 15:19
Hi Luca,
Check an example below
protected override void OnStart()
{
Positions.Closed += OnPositionsClosed;
}
void OnPositionsClosed(PositionClosedEventArgs obj)
{
if(obj.Reason == PositionCloseReason.StopLoss)
{
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Apr 2020, 14:58
Hi Luca,
You first need to explain to us what does position take stop loss means.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Apr 2020, 12:53
Hi Tony,
Thanks for your suggestions. It would be better to post them in the Suggestions section of the forum.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
14 Apr 2020, 08:20
Hi Samuel,
There is no built-in feature in cTrader to do this but you can write a cBot that will place the order at the relevant time.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous