Page 1 of 1

Chart script functions?

Posted: Mon Jul 18, 2016 11:40 am
by henry1224
Is there a function for OR?
I know that & is used for the AND function. I don't see a function for OR, is there any documentation for these symbols?

Henry

Re: Chart script functions?

Posted: Tue Jul 19, 2016 8:39 am
by Chris White
The symbol for OR is |

Take a look at the system scan named 'IanPctB Sell' to see an example

Code: Select all

B:= FML('IanPctB()[B]');
BW:= FML('IanPctB()[BW]');
FI:= FML('ForceIndex(13)[FI]');

Cond1:= (B - Ref(B, 1)) <= -.12;
Cond2:= B <= 1.2;
Cond3:= FI <= 0;
Cond4:= C < O;
Cond5:= C < SMA(C,9);
Cond6:= Count(Cross(B, BW), 40) == 0;
Cond7:= B < 0;
Cond8:= (B - Ref(B, 1)) <= -.5;


Event: (Cond1 & Cond2 & Cond3 & Cond4 & Cond5 & Cond6) | Cond7 | Cond8;
You can find some basic information on EdgeRater ChartScript here:
http://www.edgerater.com/docs/trading-s ... kstart.htm

The ChartScript language is very similar to the MetaStock Formula Language (MFL) and AmiBroker Formula Language (AFL). Any documentation for MFL will be useful such as:

http://www.equis.com/customer/resources ... Primer.pdf