
Topics
Replies
bienve.pf
02 Apr 2019, 18:22
I do not want to have global access. But only from within the robot instance. So that other instances with other symbols do not interfere with that static variable.
@bienve.pf
bienve.pf
02 Apr 2019, 14:27
public class MyPosition : Position { public static List<MyPosition> Instances = new List<MyPosition>(); }
In this case multiple instances of my robot share "Instances" and that gives access problems in the thread.
The reason for this variable is to be able to check if another MyPosition class has already been created to be able to access globally with MyPosition.Instances
How could I solve this without other threads to share the static variables?
Regards!
@bienve.pf
bienve.pf
14 Mar 2019, 16:16
How can we detect if an object is selected?
This is useful to avoid handling it while the user is modifying it
for example:
ChartTrendLine line = obj as ChartTrendLine; if( line.IsSelected ){ }
@bienve.pf
bienve.pf
08 Mar 2019, 14:41
RE:
a.fernandez.martinez said:
Hello, is it possible for a bot to watch 2 or more charts at the same time ?
For example, placing a bot on EURUSD that can also act based on event on GBPUSD, thanks.
Hola, seria bueno que puediesemos contactar por facebook y compartir esperiencias de cTrader.
Mi facebook es : https://www.facebook.com/robertillo.saez
Saludos.
@bienve.pf
bienve.pf
08 Mar 2019, 14:34
It would be very good if it were in a floating window.
One way or another should be optional. I do not know why the previous presentation is eliminated
@bienve.pf
bienve.pf
08 Mar 2019, 14:32
( Updated at: 21 Dec 2023, 09:21 )
Panel of bots
Very good improvements in version 3.5. Grouping parameters in groups and enums is something that was much missed.
I have to say that I have been programming for 2 years with cTrader / calgo and the new presentation of the configuration panel of the bots takes a bad path. You can not change the size (in this way the big titles are lost). On the other hand, clicking every time we change a parameter is a bit tedious especially when we are doing backtesting.
Greetings.
@bienve.pf
bienve.pf
30 Jan 2019, 15:03
( Updated at: 21 Dec 2023, 09:21 )
Only the "Hour" counter moves
@bienve.pf
bienve.pf
30 Jan 2019, 14:54
The counter of Total Bars for others TF distinct to cBot dont work. It does not work for me in 3.4 or in 3.3 version
Can you to see to move the counter for Daily along of backtesting?
Pleasse send image frames with this text.
Regards!
@bienve.pf
bienve.pf
30 Jan 2019, 14:28
( Updated at: 21 Dec 2023, 09:21 )
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; using System.Linq; namespace cAlgo { [Indicator(IsOverlay = true, AutoRescale = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class SRFractals : Indicator { [Parameter("Bars", DefaultValue = 600)] public int CalcBars { get; set; } [Parameter("TimeFrame1", DefaultValue = "Minute30")] public TimeFrame TimeFrame1 { get; set; } [Parameter("TimeFrame2", DefaultValue = "Hour")] public TimeFrame TimeFrame2 { get; set; } [Parameter("TimeFrame3", DefaultValue = "Hour4")] public TimeFrame TimeFrame3 { get; set; } [Parameter("TimeFrame4", DefaultValue = "Daily")] public TimeFrame TimeFrame4 { get; set; } private MarketSeries series4; private MarketSeries series3; private MarketSeries series2; private MarketSeries series1; protected override void Initialize() { // Initialize and create nested indicators series4 = MarketData.GetSeries(Symbol, TimeFrame4); series3 = MarketData.GetSeries(Symbol, TimeFrame3); series2 = MarketData.GetSeries(Symbol, TimeFrame2); series1 = MarketData.GetSeries(Symbol, TimeFrame1); } int counter = 0; public int side = 2; public override void Calculate(int index) { if (counter < index) { counter = index; string info = "TF: " + TimeFrame1 + ", Bars: " + series1.Open.Count + "\r\n" + "TF: " + TimeFrame2 + ", Bars: " + series2.Open.Count + "\r\n" + "TF: " + TimeFrame3 + ", Bars: " + series3.Open.Count + "\r\n" + "TF: " + TimeFrame4 + ", Bars: " + series4.Open.Count; Chart.DrawStaticText("info", info, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White); } } } }
Add to Visual Backtesting on empty Robot. The data history buffer for TimeFrames distinct to cbot TF not Work for my ctrader version 3.3
@bienve.pf
bienve.pf
30 Jan 2019, 12:23
@bienve.pf
bienve.pf
15 Jan 2019, 20:31
RE:
seibertm said:
Hi, I'm new to algo coding, have been looking through the class reference and help sections, but haven't been able to find an answer. How could one go about coding a cBot that picks up on pullback reversals as entry signal? I suppose the logic would have to be something like
1. Spot a trend, eg with MA cross
2. Detect price reversal, eg closing prices higher in downtrend/lower in uptrend
3. reversal occurs when price resumes previous direction, eg takes out price of last 2 counterbars
I don't know, is it possible to code for something like that? All help or suggestions would be appreciated, thank you.
Hi, I'm a cbots programmer in cTrader. If you wish send me a private message to my facebook profile:
https://www.facebook.com/robertillo.saez
Regards.
@bienve.pf
bienve.pf
15 Jan 2019, 19:16
ok. It would be very useful and necessary for my tests.
Thanks.
@bienve.pf
bienve.pf
15 Jan 2019, 16:18
If I start a Backtesting at 1.40 the PipValue remains fixed and must be variable according to the price of quotation.
It is not the same to lose 20 pips in 1.10 (EURUSD) than to lose 20 pips in 1.40
regards
@bienve.pf
bienve.pf
05 Dec 2018, 13:11
In this example it does not work. Do not draw the text in the Indicator ChartArea:
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 overlay : Indicator
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { 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
Result[index] = 1;
if( IsLastBar){
var txt = Chart.DrawText("txt", "EURUSD", index + 3, 1, Color.Orange);
}
}
}
}
@bienve.pf
bienve.pf
02 Apr 2019, 18:35
Okay. I found the solution I was looking for. In case it serves to someone. [threadstatic] makes the static variable only accessible and modifiable from the same instance
@bienve.pf