NexusFi: Find Your Edge


Home Menu

 





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


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,236 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

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

  #1 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

*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)

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129


If it'll help anyone, the T.S. has been turned into Easylanguage here:

https://www.elitetrader.com/et/threads/3-bar-system-by-larry-williams-from-prorealtime-to-easylanguage.342399/

Reply With Quote
Thanked by:
  #4 (permalink)
 gorbod 
Sverige
 
Experience: Advanced
Platform: Multicharts, Tradestation
Trading: OMX futures
Posts: 5 since Aug 2014
Thanks Given: 1
Thanks Received: 1

Maybe this can be an EasyLanguage version:
(No debugging done)

//Moving averages:
Var: mal(0), mah(0);
mal = Average(Low,3);
mah = Average(High,3);

//Trend analyzer:
Var: trnd(0), TotalPrice(0);
TotalPrice = (O+H+L+C)/4;
Trnd = LinearRegSlope(TotalPrice, 3);

//Uptrend VS Downtrend
Var: c1(0),c2(0);
c1=(Trnd[1]>0);
c2=(Ttrnd[1]<0);

// 3-Bar System long orders
If Marketposition<=0 and c1 then
BUY 1 contract at mal[1] limit;
If Marketposition=1 and c2 then
SELL next bar at mah[1] limit;

// 3-Bar System short orders
If Marketposition>=0 and c2 then
SELLSHORT 1 contract at mah[1] limit;
If Marketposition=-1 and c1 then
BuyToCover next bar at mal[1] limit;

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

mal=Average[17](low)
mah=Average[17](high)
Then use these instead:
mal = Average(Low,17);
mah = Average(High,17);

trnd=LinearRegressionSlope[12](TotalPrice)
Then use this instead:
Trnd = LinearRegSlope(TotalPrice, 12);
}

Reply With Quote
Thanked by:
  #5 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

All of you...

[img]https://i.postimg.cc/qv5BWKVc/Buona-Pasqua-13.jpg[/img]

Reply With Quote




Last Updated on April 10, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts