RaiseRunTimeError

From MultiCharts
Revision as of 05:55, 9 February 2012 by JoshM (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Generates a run-time error and displays the specified error message.

A run-time error will cause the execution of the study to be aborted.

Usage

RaiseRunTimeError("Message")

Where:

Message - a string expression specifying the error message.

Example

Generate a run-time error and display the message "Strategy Stopped":

RaiseRunTimeError("Strategy Stopped");

Or to generate a run-time error when the user adds an indicator to an unsuited market:

if (Category = 12) then 
	RaiseRunTimeError("This indicator isn't suitable for Forex!");