Unformatted text preview:

Trraders s Jo oe Langua age Refere ence Manu ual Versio on 1 0 By Mon nu Chacko Email mc3 3574 columbia edu Traders Joe J is a tech hnical analys sis language e that is used d for modelin ng various algorithms 1 Traders Joe Table of Contents Introduction 3 Lexical Conventions 3 Character Set 3 Keywords 3 Constants 3 Integer Constants 3 Floating Point Constants 4 String Constants 4 Operators 4 Punctuators 5 Comments 5 White Spaces 5 Data Types 5 Simple Types 5 Complex Types 5 Statements 6 Compound Statements 6 Expression Statements 6 Control Statements 6 While loop 6 For loop 6 If else condition 6 Functions 7 Built in Functions 7 Alert 7 Trace 7 EMA 7 SMA 7 Candle 8 Fib 8 Open 9 Close 9 2 Traders Joe High 9 Low 10 Error Handling 10 Time Series Inputs 11 Scope Rules 11 Appendix A 13 3 Traders Joe Introduction Traders Joe is a language that provides high level technical analysis capabilities for any product like forex security etc This language is easy to use and has built in functions that help in technical analysis Traders Joe understands mathematical notations and uses algorithms for modeling and simulating any trading models Traders Joe is written using OCaml and is optimized for technical analysis It uses the state ofthe art algorithms that are widely used by the technical analysis community Lexical Conventions Character Set Traders Joe uses ASCII character Keywords Following are the keywords used by this language These reserved words cannot be used as identifiers in the program Keywords are case sensitive break candle Case Catch Close Else elseif ema Fib For High is equal to is greater than is less than is less than or equal to is not equal to Loop Low Median Open sma sort asc sort desc sum trace try while alert Constants Integer Constants An integer constant can contains series of number from 0 to 9 For example 2000023 4 Traders Joe Floating Point Constants Floating point are real numbers that contain fraction part These numbers has an integer part a decimal point and numbers that follow the decimal points The character e is optionally assigned after the decimal point String Constants String constant are enclosed within double quotes It can contain escape characters that is used for formatting messages Operators Operators allow users to perform various operations The following list contains various tokens that are used to assess relationship perform logical operation calculate numerical values or to assign values to a variable Alternatively users can also use is equal to is greater than is less than is less than or equal to is not equal to to perform relationship operations Relational operators Equal To Not Equal To Less Than Greater Than Less Than or Equal To Greater Than or Equal To Logical operators Not And Mathematical operators Add Subtract Multiply Divide Power Assignment operator Assign 5 Traders Joe Punctuators Following punctuators are used to enclose or separate values or arguments For example a string value is enclosed within double quotes string value and a character value is enclosed within single quotes a Punctuators Description Encloses string value Encloses character value Groups arguments in a function Separates arguments in a function Comments Comments are started with an open square bracket immediately followed by a start and terminated with a star immediately followed by a close square bracket Any text between and are ignored Comments helps programmers describe the function they are writing Any code block enclosed between comments begin and end tag is also ignored For example This comment is ignored by the program White Spaces White spaces like tabs line feeds etc are used to structure the code block Developers may use them to align the code block to make their code readable Data Types Simple Types Type Description boolean int float string char Boolean i e true or false Integer values e g 1 2 3 Floating point values e g 1 2001 String value e g string value Character value e g a Complex Types Objects are classes that contain types variables functions etc that represents a model Trading algorithms can be organized into classes and initialized as objects at runtime This is useful when comparing the performance of two trading models 6 Traders Joe Statements Statements are sequence of statements or expressions that are executed sequentially They can be complex or simple Compound Statements Compound statement is collection of statements or expressions that are enclosed within a code block A code block can be a function that is enclosed within a begin and end keyword Expression Statements An expression is a statement that is separated by a operator For example var price 1 2005 Control Statements While loop While loop allows conditional execution of the Example while close 0 is less than ema 20 begin statement end For loop for expression 1 expression 2 expression 3 begin statement end If else condition If else are conditional statements and has the following syntax if EURUSD close 0 is less than ema 10 0 then warn Buy EURUSD else warn No signal 7 Traders Joe Functions Built in Functions Alert The alert function is used to return information to the user A statement enclosed in double quotes should follow the alert command Alert statement without proper string statement will return Improper syntax error Example alert The opening price is greater than the previous closing price Trace Trace is used to generate valuable information about the program and is used for debugging Trace outputs suppressed when moving the code to the production environment A string statement should follow the trace command Example trace Reached the GetPrice function EMA Exponential Moving Average EMA is a type of moving average that reacts faster to recent price changes This function takes time period and calculating period as its parameter and returns a floating point number Example ema 10 1 returns the previous days EMA that is calculated using 10 days average SMA Simple Moving Average SMA is a type of moving average that reacts slower to recent price changes This function takes time period and calculating period as its parameter and returns a floating point number 8 Traders s Joe Example sma 10 1 returns the previous days SMA A that is calcu ulated using g 10 days avverage Candle Candle sticks s are pa atterns on the bar charrt that descrribes the priice moveme ent This fun nction takes the e calculating g time and returns r the type t of cand dle stick pattter found fo or that day Dogi


View Full Document

Columbia COMS W4115 - Traders Joe Language Reference Manual

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

NumLang

NumLang

6 pages

EMPATH

EMPATH

14 pages

La Mesa

La Mesa

9 pages

JTemplate

JTemplate

238 pages

MATVEC

MATVEC

4 pages

TONEDEF

TONEDEF

14 pages

SASSi

SASSi

16 pages

JTemplate

JTemplate

39 pages

BATS

BATS

10 pages

Synapse

Synapse

11 pages

c.def

c.def

116 pages

TweaXML

TweaXML

108 pages

Load more
Loading Unlocking...
Login

Join to view Traders Joe Language Reference Manual and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Traders Joe Language Reference Manual and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?