# MAX AND MIN FUNCTION

```BUY{
SET HV = MAX(HIGH,10);
HIGH > HV;}

LONGEXIT{
SET LV = MIN(LOW,10);
LOW < LV;}```

# Median Price (MP) And Weighted Moving Average (WMA)

A Median Price is simply an average of one period’s high and low
values.A Weighted Moving Average places more weight on recent
values and less weight on older values.

```BUY{
SET MA200 = EMA(CLOSE,200);
SET MD = MP();
SET MA = WMA(MD,50);
MD > MA AND CLOSE > MAX(HIGH, 10) AND CLOSE > MA200;}

SELL{
SET MA200 = EMA(CLOSE,200);
SET MD = MP();
SET MA = WMA(MD,50);
MD < MA AND CLOSE < MIN(LOW, 10) AND CLOSE < MA200;}```

This slideshow requires JavaScript.

# HEIKIN-ASHI

Heikin-Ashi Candlesticks use the open-close data from the prior period and the open-high-low-close data from the current period to create a combo candlestick.

```[HEIKINASHI]
SET hv = MAX(CLOSE,10);
CLOSE > hv and REF(CLOSE,2) < REF(OPEN,2) and REF(CLOSE,1) > REF(OPEN,1) and CLOSE > OPEN and CLOSE > REF(CLOSE,1);}

LONGEXIT{
REF(CLOSE,1) < REF(OPEN,1);}

SELL{
SET Lv = MIN(CLOSE,10);
CLOSE < lv and REF(CLOSE,2) > REF(OPEN,2) and REF(CLOSE,1) < REF(OPEN,1) and CLOSE < OPEN and CLOSE < REF(CLOSE,1);}

SHORTEXIT{
REF(CLOSE,1) > REF(OPEN,1);}```

This slideshow requires JavaScript.

# Standard Deviation-SuperTrend Strategy

Standard Deviation is a common statistical calculation that measures volatility. Supertrend is a trend following indicator which can be used to identify upward or downward trends.

BUY : when current SD is greater than maximum EMA on SD for previous 40 period.
SELL: when Supertrend crossed above Current close.

```BUY{
SET sd = SDV(CLOSE,21,2,SIMPLE);
SET st = SUPERTREND(200,5,SIMPLE);
SET av = EMA(sd,50);
SET hv = MAX(av,40);
sd > hv and CLOSE > st;}```
```SELL{
set sd = SDV(CLOSE,21,2,SIMPLE);
set st = SUPERTREND(200,5,SIMPLE);
CROSSOVER(st,CLOSE);}```

This slideshow requires JavaScript.

# Range Breakout

This strategy uses 50 week break out system excluding the current day.

##### BUY   : When Current high crossed above 50 week (350 days) high .SELL : When Current low crossed below EMA of period 9.
```BUY{
set hv = MAX(HIGH,350);
set ma1 = EMA(CLOSE,5);
CROSSOVER(ma1,hv);}

LONGEXIT{
CROSSOVER(EMA(CLOSE,9),LOW);}```

# 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);}```