AL
alexanderearle16@googlemail.com
0 follower(s)
0 following
3 subscription(s)
Topics
30 Apr 2018, 21:13
1620
2
25 Apr 2018, 19:29
1785
4
24 Apr 2018, 22:01
1539
1
Replies
alexanderearle16@googlemail.com
26 Apr 2018, 21:30
RE:
Panagiotis Charalampous said:
Hi Alexander,
See below an example of how to initialize a Bollinger Bands indicator in cAlgo and check the difference between the Top and Bottom bands
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; } BollingerBands _bb; protected override void OnStart() { _bb = Indicators.BollingerBands(MarketSeries.Close, 20, 2, MovingAverageType.Simple); } protected override void OnTick() { if ((_bb.Top.LastValue - _bb.Bottom.LastValue) > Symbol.PipSize * 10) { // Trade... } } protected override void OnStop() { // Put your deinitialization logic here } } }Let me know if this helps,
Best Regards,
Panagiotis
Thank you very much to go to that extent to help me, it was a great help. I have one more problem that I am now encountering, would it be possible to get your email adress to pass it on?
Alexander
@alexanderearle16@googlemail.com
alexanderearle16@googlemail.com
26 Apr 2018, 22:41
RE: RE:
alexanderearle16@googlemail.com said:
Sorry, I should've added this...
@alexanderearle16@googlemail.com