I have copied Macd, Changed names, added a period for the HMA, and added a plot line to the Initialize() section of the indicator as well as the HMA logic to the OnBarUpdate() section. This is where I've run into a challenge.
I called the plot "DiffAv" in the initialize section, but when I compile the code, I get the error message "The name 'DiffAv' does not exist in the current context (I got the same error message on the indicator SMAVolume tutorial). Despite a few hours puzzling this through and trying different approaches, I keep coming back to the same error. It likely is something simple I am just missing, but any help would be greatly appreciated. I have attached the indicator for reference.
Guy
Comment