Multicharts Copy/Paste Function Issue

Discussion in 'App Development' started by vitrader, Mar 4, 2016.

  1. vitrader

    vitrader

    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.
     
  2. dartmus

    dartmus

    That code should be pasted into an indicator instead of a function. Neither of those examples are functions.
     
  3. vitrader

    vitrader

    dratsum,

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

    dartmus

    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);
     
  5. vitrader

    vitrader

    It worked! Thank you!
     
    dartmus likes this.