Topic: I need help to customize this indicator
Hello,
First of all after posting this post I found that i should have posted it in Developers Forum so please transfer this topic to Developers Forum if its needed.
I decided to make a custom indicator from momentum indicator for an experiment but i faced some errors in coding it. I know probably my custom indicator is not useful, but i need it so please help me to fix the cide.
I attached the code. Most parts of it is the main momentum.cs file but i just added some lines to it. My changes start from line 111 and ends to line 133.
The usual moment indicators takes a moving average from (price[bar] - price[bar - period]) but i want to only substract the price of first bar, i mean price[1], from minimum value of all other bars. I exactly mean this: price[1] - minimumprice[1 to period]. For examplke if there is 10 bars, i want to have this:
price[1] - minimumprice[1 to 10]
My code has this error.
ERROR: "Momentum" compilation failed.
Line 133 Column 16: Cannot implicitly convert type 'double' to 'double[]'.
Please help me to fix this issue.
I attached my customed code. (not important but I also changed the indicator name to mymomentum to avoid facing problem with this).
Thanks a lot in adavnce for your help.