Multicharts Copy/Paste Function Issue

Hello,

I am fairly new to programming and I am trying to look at existing functions to get the hang of things.

I copied and pasted two different versions of a Heiken-Ashi function as my first test. When I try to compile either one, I get a very similar error. Please see the attached file showing the screenshot. You will see that it appears that I have an error on a color.

This is probably a really simple solution where I didn't set something up correctly, but all I am doing is copying and pasting a function and hitting compile. I am under the assumption that these functions work and I get the same error with both.

Do I have to use the function in a project/solution before it can be compiled so the color is established elsewhere?

If anyone has any suggestions it will be greatly appreciated.

Thank you.
 

Attachments

  • compile_function_error.png
    compile_function_error.png
    303.7 KB · Views: 29
That code should be pasted into an indicator instead of a function. Neither of those examples are functions.

dratsum,

Thank you for your reply. When I paste it as an indicator I get the following error. Please see attached screenshot.
 

Attachments

  • compile_function_error 2.png
    compile_function_error 2.png
    290.1 KB · Views: 34
Go to the top line and add another input by going to the end of the input line, backspace to delete the semicolon and then add this (which begins with a comma) ...

, CompBars(5);
 
Back
Top