MAX And MIN Function

Predefined Function in Greek Language (GL), MAX and MIN Function returns a  vector containing a running Maximum Or Minimum value , excluding current.

BUY  :  Current High crosses Above previous highest high value for Today.
LONGEXIT : Current High crosses below to EMA of 5 Period.

SELL : Current low Crosses below previous lowest low value for Today.
SHORTEXIT : Current High crosses below to EMA of 5 Period.

```BUY{
set bc = BARCOUNT(TODAY);
set hv = MAX(HIGH, bc);
CROSSOVER(HIGH,hv);}

LONGEXIT{
CROSSOVER(EMA(CLOSE,5),HIGH);}```

Similarly,

```SELL{
set bc = BARCOUNT(TODAY);
set lv = MIN(HIGH, bc);
CROSSOVER(lv,LOW);}

SHORTEXIT{
CROSSOVER(EMA(CLOSE,5),HIGH);}```

CANDLESTICK PATTERNS

Greek Language (GL) provides a simple, built-in function that can identify one of the two dozen predefined candlestick patterns as mentioned below :

```BUY{
CSP() =MORNING_STAR;}

LONGEXIT{
CSP() =EVENING_STAR;}```

Similarly,

```SELL{
CSP() =HANGING_MAN;}```
```SELL{
CSP() =DARK_CLOUD_COVER;} ```

```SELL{
CSP() =BEARISH_ENGULFING_LINE;} ```

MACD Strategy

MACD : Moving Average Convergence/Divergence
RSI : Relative Strength Index

BUY : When MACD Crosses above MACD Signal Line And RSI > 60
SELL : when EMA Of Period 9 Crosses above Current High

Formula As Follows :

set ma1 = MACDSIGNAL(13,26,9,SIMPLE);
set ma2 = MACD(13,26,9,SIMPLE);
CROSSOVER(ma2,ma1) and RSI(CLOSE,21) > 60;}

LONGEXIT{
CROSSOVER(EMA(close,9),HIGH);}

Greek Trend Trader (GTT) : Introduction to Greek Language

GL (Greek Language) is powerful yet simple programming language for traders.The language provides the framework required to build sophisticated trading programs piece by piece without extensive training or programming experience.

For Example :

BUY: Crossover of Exponential Moving averages of period 5 and 30.
LONGEXIT: High is lower than EMA of 21 period.