Welcome to the Traders Laboratory Forums.
Open E Cry The unofficial Open E Cry forum.

Reply
Old 03-01-2009, 08:36 PM   #1

Join Date: Jan 2008
Location: San Francisco
Posts: 394
Ignore this user

Thanks: 17
Thanked 338 Times in 156 Posts



Functions In OEC Diff't Than TS Fyi

FYI, from the Custom Indicators User Guide ( http://www.openecry.com/includes/pdf...Indicators.pdf )

pg 39


Functions
The plug‐in provides the ability to add its own EasyLanguage functions. In contrast to TradeStation, the body of functions is a part of the same file as the body of indicator. To separate the code of the indicator and the code of functions, use the directive #function name of function. One indicator file contains the unlimited number of functions.

Example:

input:
Price(Close);
Plot1(RoC(Price), "RoC")
#function RoC
inputs:
Data(numericseries);
RoC = (Data - Data[1])/Data*100;


EasyLanguage code editor also moves functions from another editors.

Copy the code of function from elsewhere and execute the command menu Add Function. This command determines the name of the function and inserts it with the #function directive to the end of file.

Library of EasyLanguage Functions

The user creates an individual library of EasyLanguage functions.
Save an EasyLanguage file with an extension .lib.el (for example, MyFunctions.lib.el). All files with this extension are treated as parts of the common library.

If the indicator contains a call of some function, the EasyLanguage compiler searches it in this next sequence:
1. Internally supported functions of the compiler (Refer to List of supported EasyLanguage functions)
2. External functions that declared with “external” directive
3. Functions of the same file as the code of indicator (Refer to Functions)
4. Functions of *.lib.el files
Frank is offline  
Reply With Quote
The Following User Says Thank You to Frank For This Useful Post:
Trendup_ (03-07-2009)

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


All times are GMT -4. The time now is 01:35 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.