Strategy Sample: use of MIN() and MAX()

The following sample startegy will issue a Buy if:

  1. We do not have market position and.
  2. Close is greater than SMA(200) and.
  3. Close is equal to the MIN value of the last 10 days.

The following sample startegy will issue a Sell if:

  1. We have market position
  2. Close is equal to the MAX value of the last 5 days.


##
## MIN 10 days and MAX 5 days Strategy
##

if ( MP == 0 and
Close() > SMA(200) and
Close() == MIN(10) ) {
Buy(" Close=".Close()." Min10=".MIN(10) );
}

elsif ( MP != 0 and
Close() == MAX(5) ) {
Sell(" Sell=".Close()." Max5=".MAX(5) );
}

X
Enter your Strategy Seeker username.
Enter the password that accompanies your username.
8 + 9 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Secure Login

This login is SSL protected

Loading