3-Bar System by Larry Williams: from ProRealtime to EasyLanguage

Almarok

Junior member
20 1
Hi,

I found in my archive the Trading System: 3-Bar System by Larry Williams, but it's for ProRealtime, if someone could turn it into EasyLanguage, so you could test it in the various Markets.

Thank you in advance.

Explanation: Total Price is the average value between open, high, low and close: (O+H+L+C)/4

// 3-Bar System long (simple)
*
mal=Average[3](low)
mah=Average[3](high)
*
trnd=LinearRegressionSlope[3](TotalPrice)
*
c1=(trnd[1]>0)
c2=(trnd[1]<0)
*
IF NOT LongOnMarket AND c1 THEN
BUY 1 CONTRACTS AT mal[1] limit
ENDIF
*
If LongOnMarket and c2 THEN
SELL AT mah[1] limit
ENDIF

// 3-Bar System short simple
*
mal=Average[3](low)
mah=Average[3](high)
*
trnd=LinearRegressionSlope[3](TotalPrice)
*
c1=(trnd[1]>0)
c2=(trnd[1]<0)
*
IF NOT ShortOnMarket AND c2 THEN
Sellshort 1 CONTRACTS AT mah[1] limit
ENDIF
*
If ShortOnMarket and c1 THEN
EXITSHORT AT mal[1] limit

ENDIF

-------------------------
However, the author suggests the following values based on the tests carried out:

mal=Average[17](low)
mah=Average[17](high)

trnd=LinearRegressionSlope[12](TotalPrice)
 
Last edited:
 
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock