I was using the default VMA in a strategy, but an error on each compile. I do believe that the dataseries in VMA is available to use in a strategy?!
I used a double :
b1_VMA[0] = VMA(BarsArray[1],iUseVMAPeriod,iUseVMAPeriodCMO).VMA[0];
and received an error:
" Cannot apply indexing with [] to an expression of type 'method group',CS0021 " ...which to me made no sense.
I tried another VMA (jhlVMA from BMT) that also contained a VMA plot and compiles without a problem, without any code change except for indie name:
b1_VMA[0] = jhlVMA(BarsArray[1],iUseVMAPeriod,iUseVMAPeriodCMO).VMA[0];
Problem solved, but I am curious why this is with a default indicator?
Jon
Comment