!Close today within 60 - 70% of Close
10 to 40 days ago.
CloseToday60Percentormore if [Close] >= (Close10to40 * 0.60).
CloseToday70percentorless if [Close]<= (Close10to40* 0.70).
Close10to40 is HiVal([Close],30,10).
Close60to70 if CloseToday60Percentormore and CloseToday70percentorless.
Averageclose is simpleavg([close], 200).
Avgclose5daysago is valresult(averageclose, 5).
Averagevolume is simpleavg([volume], 200).
Close is [close].
Close5daysago is val([close], 5).
Volume is [volume].
Crossup200MA if (close > averageclose) and (close5daysago < avgclose5daysago)
and (close > 5) and (volume > (averagevolume *2)).
Averageclose is simpleavg([close], 200).
Avgclose5daysago is valresult(averageclose, 5).
Averagevolume is simpleavg([volume], 200).
Close is [close].
Close5daysago is val([close], 5).
Volume is [volume].
Crossdown200MA if (close < averageclose) and (close5daysago > avgclose5daysago)
and (close > 5) and (volume > (averagevolume *2)).
!! Up 20% on double average volume.
ROC5 is (([close] - val([close], 5)) / (val([close], 5))) * 100.
AvgVol5 is simpleavg([volume], 5).
AvgVol60 is simpleavg([volume], 60,5).
Up20 if (roc5 >=20) and (avgvol5 >= (avgvol60 *2)).
!!! Tom DeMark's Range Expansion Index
- The Range Expansion Index (REI) identifies areas of price exhaustion
!!! generally associated with price peaks and troughs. This indicator
is selective in the sense that it compares
!!! current price activity with recent price movement, but it ignores
breakaway price moves until its steepness
!!! begins to dissipate.
!!! For better results, if the number of bars outside the band is
5 or fewer, a potential top or bottom has been formed.
!!! Generally. this is confirmed once a down/up close versus the
previous day's bar is recorded.
H is [high].
H2 is val([high], 2).
H5 is val([high], 5).
H6 is val([high], 6).
L is [low].
L2 is val([low], 2).
L5 is val([low], 5).
L6 is val([low], 6).
C is [close].
C7 is val([close], 7).
C8 is val([close], 8).
TD1 is h - h2.
TD2 is l - l2.
TD3 is iff((h >= l5 or h >= l6) and (l <= h5 or l <= h6), 1, 0).
TD4 is iff((h2 >= c7 or h2 >= c8) and (l2 <=c7 or l2 <=c8), 1, 0).
TD6 is td1 + td2. TD5 is iff((td3 + td4) >=1, td6, 0).
TD7 is abs(td1) + abs(td2).
!!! Volume combined with Volatility
!!!!!!!!!Volume Filters!!!!!!!!!!!!!!!
VolumeNot0 if [Volume] > 0.
VolumeNot1000x if [Volume] < [Volume ESA] * 1000.
EnoughVol if [Volume ESA] > 200.
VolumeOk if VolumeNot0 and VolumeNot1000x and EnoughVol.
!!!!!!!!!!!!Price Filters!!!!!!!!!!!!!!!
OKTrade if [close] > 2.
NotTooVolital if [Volatility] < [Volatility MA] * 1.5 and [Volatility]
< 80.
PriceOk if OKTrade and NotTooVolital.
TradeOK if PriceOk and VolumeOk.
! Alert for volume spikes and good
price movements
! 25% volume spike
VolumeSpike if [volume] >= [volume esa] * 1.25.
! Closed up if higher than previous days high
ClosedUp if [close] >= Val([high],1).
SpikedUp if VolumeSpike and ClosedUp.