LU
Topics
10 Aug 2023, 21:08
786
3
10 Aug 2023, 21:08
767
1
08 Aug 2023, 12:37
909
1
07 Aug 2023, 18:17
973
3
12 Oct 2020, 10:39
1617
2
04 Oct 2020, 21:56
4458
7
03 Oct 2020, 15:08
1763
4
03 Oct 2020, 14:59
1303
1
30 Sep 2020, 16:30
1293
2
30 Sep 2020, 16:20
1311
3
29 Sep 2020, 19:58
1153
2
29 Sep 2020, 19:53
1270
2
25 Sep 2020, 11:03
1282
2
24 Sep 2020, 20:14
1211
2
16 Sep 2020, 10:25
2592
3
31 Aug 2020, 19:37
1771
4
31 Aug 2020, 17:03
1628
4
29 Jul 2020, 13:59
1198
2
27 Jul 2020, 21:41
1172
2
27 Jul 2020, 17:03
1188
2
Replies
luca.tocchi
26 Mar 2020, 09:57
RE:
PanagiotisCharalampous ha detto:
Ciao Luca,
possibile utilizzare l'evento Position.Closed per tracciae quando un posizione parte chiuso e imprevedibile un'azione. Sotto vedi un esempio
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() { Positions.Closed += Positions_Closed; } private void Positions_Closed(PositionClosedEventArgs obj) { } protected override void OnTick() { // Put your core logic here } protected override void OnStop() { // Put your deinitialization logic here } } }
Migliori saluti
Panagiotis
Thanks! ok i use the event closed position. but to open a random instance, at the beginning of the program, without a condition occurring?
@luca.tocchi
luca.tocchi
26 Mar 2020, 12:04
RE:
PanagiotisCharalampous said:
the sample Martingale cBot does not open assets. The "Sample Martingale cBot" creates a random Sell or Buy order only
maybe I got confused.
with instance I mean asset
@luca.tocchi