I have a strategy based on an indicator which is based on a different indicator, all the three (1 strategy and 2 indicators) have the same input interface:
Code: Select all
<Input()> Public Property Big_Length As Integer
<Input()> Public Property Small_Length As Integer
Public Sub New(ByVal _ctx As Object)
MyBase.New(_ctx)
Me.Big_Length = 300
Me.Small_Length = 20
End Sub
Code: Select all
Private MyInd As PowerLanguage.Indicator.Main_Tick_V4
MyInd = AddIndicator("Main_Tick_V4")
MyInd.Big_Length = Me.Big_Length
MyInd.Small_Length = Me.Small_Length
My problem is when i tried to optimize my results by setting the range of Me.Small_Length to 10 ~ 30 i got the same profit for every input... so I've added printouts for each indicator to see what is the input value it receives and indeed it looks like it doesn't inherit the values set by its parent creator and it keeps on using the default values..
Any thoughts will be highly appreciated!!
Thank you all and wish you a great year with lots of profits!
R.