Topics
Replies
Spotware
24 Feb 2014, 12:17
RE: RE:
AimHigher said:
Spotware said:
To check current time you can use Server.Time:
if (Server.Time.Year == 2013 && Server.Time.Month == 10 && ...)For placing orders you can use PlaceLimitOrder or PlaceStopOrder functions.
I think the question is if you can backtest a set of trades with entry and exit times and entry and exit prices that are already determined regardless of whether those prices match the prices in the price history in cAlgo. Personally i think that kind of analysis is preferable to set up in Excel, assuming that you have a list of trades e.g in a csv file.
cAlgo doesn't have such functionality
@Spotware
Spotware
24 Feb 2014, 10:35
Hello, we are looking into the issue and it will be fixed soon. Note that this affects only historical data (a chunk of data is missing). The trendbars that are created live should be working fine and live trading is not affected.
We apologise for the error and we thank you for your patience and undrestanding.
@Spotware
Spotware
21 Feb 2014, 14:23
It is an issue of that specific Heikin Ashi custom indicator. As an alternative you can use Heikin-Ashi Smoothed with period 1
@Spotware
Spotware
19 Feb 2014, 17:39
Please look at the following example:
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; namespace cAlgo.Indicators { [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC)] public class AdxR : Indicator { [Output("adx 7", Color = Colors.Blue)] public IndicatorDataSeries Adx7 { get; set; } [Output("adx 21", Color = Colors.Yellow)] public IndicatorDataSeries Adx21 { get; set; } [Output("adx 42", Color = Colors.Red)] public IndicatorDataSeries Adx42 { get; set; } private DirectionalMovementSystem _dms7; private DirectionalMovementSystem _dms21; private DirectionalMovementSystem _dms42; protected override void Initialize() { _dms7 = Indicators.DirectionalMovementSystem(7); _dms21 = Indicators.DirectionalMovementSystem(21); _dms42 = Indicators.DirectionalMovementSystem(42); } public override void Calculate(int index) { Adx7[index] = _dms7.ADX[index]; Adx21[index] = _dms21.ADX[index]; Adx42[index] = _dms42.ADX[index]; } } }
There are 3 ADX lines in the same panel.
@Spotware
Spotware
18 Feb 2014, 17:50
Please look at the following 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)] public class Sample : Robot { const string Label = "My unique label"; protected override void OnTick() { var position = Positions.Find(Label); if (position == null) { //if there is no position with my label ExecuteMarketOrder(TradeType.Buy, Symbol, Symbol.VolumeMin, Label); } else { //if position exists //some actions with position object } } } }
You need to specify the Label in trade operation and then find your position with Positions.Find method
@Spotware
Spotware
18 Feb 2014, 15:46
To check current time you can use Server.Time:
if (Server.Time.Year == 2013 && Server.Time.Month == 10 && ...)
For placing orders you can use PlaceLimitOrder or PlaceStopOrder functions.
@Spotware
Spotware
24 Feb 2014, 12:48
We are aware of this problem. It will be fixed as soon as possible.
As a work around you can move everything from Indicators folder to some temporary folder, run cAlgo and move everything back. You need to do it only for first run of cAlgo.
@Spotware