Using Costom Indicator in a cBot
Using Costom Indicator in a cBot
09 Dec 2017, 18:52
Hello,
I try to use an self written indicator in my cbot. The initalization is working:
"RF = Indicators.GetIndicator<RaisingFalling>(MACDLC, MACDSC, MACDP, BOLMAType, BOLSD, BOLP, MAX_GEWINN_FAKTOR);" in my cbot is calling the Initialize() Methode in my indicator correctly.
But the main methode "public override void Calculate(int index)" seems to be never called. All the variables have always the inital-values and never changes. When I debug my code, the nested indicators I use in my indicator are changing, but no other variables. The wierd thing is that when I use just the indicator everthing seems to work just fine, the methods are all in use.
Does anyone know where the problem coud be?
best regards
Replies
christophdaube
11 Dec 2017, 11:22
Hi Andrey,
this was the Issue. Already fixed it. Thanks!
@christophdaube
ap11
11 Dec 2017, 11:03
RE:
Hi Christophdaube,
Do you call RF.Result[...] or RF.Result.LastValue in your cBot?
Referenced indicator using lazy evaluation. Calculate method will not be called untill cBot requests output data series value. But Initialize method is called when you creating indicator instance in cBot.
Please check if this is the issue here.
Kind Regards,
Andrey
christophdaube said:
@ap11