A new custom indicator will not appear in any menu until it’s been successfully executed once.

If there is a problem with the script, you might have had an error message after pushing the « Execute » button. Some of the error messages might point to a missing parenthesis, an unrecognized keyword or a variable being used before being defined. In this case, it’s easy to correct.

Sometimes, the error messages are cryptic or the program was running in an endless loop and you had to abort. In this case, Mastock offers two debug tools.

Step 1:

If you press the button « Analyze », you should see colors appear on the text. Each color has a signification, red is a keyword, blue a variable, yellow a numeric parameter, ….

Every character should be colored outside of parenthesis and commas.

If one word is not colored, it means the program could not determine what it is. This might be where the typo is.

Screen Shot 2012-03-13 at 3.11.18 PM


Step 2:

When there is no typo, but more of a logic problem, you might want to dig deeper. In order to do that, press a second time on the « Analyze » button.

You should see a logical tree. Clicking on the arrows, open the next logical level and you can see how the various lines were logically interpreted.

Screen Shot 2012-03-13 at 3.17.45 PM


Step 3:

There might be other steps… Sometimes we just see what we want to see and miss the obvious typo… Sometimes, it’s a logic error and you might want to refer to the detailed keywords help pages.