Below is the link to the June 8, 2024, Easy Language Basic 101 Class
https://drive.google.com/file/d/1WTk6OH6swefFKybarOumDNfHjbzUdcQi/view?usp=sharing
You will need to copy and paste the link into your browser.
Below is a link to a video "Easy Language Lesson #1 Syntax"
https://drive.google.com/file/d/18q5R8tW2Sd-T4JQSkj0ZVab3dKjoXajG/view?usp=sharing
Below is a link to video "Easy Language Lesson #2 Essentials"
https://drive.google.com/file/d/1lKM2z7h4RrqaTY9L8XtJEqlyucZ6Yu-X/view?usp=sharing
Below is the link to Easy Language code for strategy Power RSI, discussed at Meetup June 12, 2021
https://drive.google.com/file/d/12qAvJw1AmMzCMNet_G_YkhslREoBjmgf/view?usp=sharing
From October 12, 2019 finding the best time of the day to trade a stock, from Steve Alexander
{Alex What Time Strategy
Copyright (c) December, 2018, Steve Alexander
All Rights Reserved
=============================================}
inputs:
buyday(0), // day of week to buy, 1 = Monday, 2 = Tuesday, etc
sellday(0), // day of week to sell
buytime(700), // time to buy
selltime(1200), // time to sell
BeginBankroll(25000); // beginning bankroll
variables:
bankroll(0), // running bankroll
size(0); // number of shares to trade
//=========
// Mainline
//=========
bankroll = (BeginBankroll) + NetProfit;
size = intportion(bankroll/close);
//======
// Buy
//======
if dayofweek(date) = buyday
and marketposition = 0
and time = buytime
then buy size shares this bar on close;
//=====
// Sell
//=====
if marketposition = 1
and dayofweek(date) = sellday
and time = selltime
then sell all shares this bar on close;
//============
// End Program
//============
From meeting of 1/13/18, 3 Green Bars from Steve Alexander
From meeting of 1/13/18
{Alex 3 Green Strategy
Copyright (c) September, 2017, Steve Alexander
All Rights Reserved
==============================================}
inputs:
Bankroll(25000), // bankroll
ProfitTargetPct(3), // profit target %
StopLossPct(3); // stop loss %
variables:
NewBankroll(0), // current bankroll
MidBar(0), // middle of a bar (open + close)/2
Size(0); // trade size (shares)
//=========
// Mainline
//=========
Once begin
NewBankroll = Bankroll;
Size = NewBankroll/high;
if mod(Size,10) <> 0 then Size = Size - mod(Size,10);
end;
//===========
// Enter Long
//===========
if close > open
and close[1] > open[1]
and close[2] > open[2]
and close[3] > open[3]
then buy Size shares next bar at market;
//==============
// Profit Target
//==============
if marketposition = 1 then begin
if (high - EntryPrice)/EntryPrice > (ProfitTargetPct/100)
then sell ("target") next bar at market;
end;
//==========
// Stop Loss
//==========
MidBar = (open + close)/2;
if marketposition = 1 then begin
if (highest(MidBar,5) - low)/highest(MidBar,5) > (StopLossPct/100)
then sell ("stop") next bar at market;
end;
//============
// Compounding
//============
NewBankroll = Bankroll + NetProfit;
if marketposition = 1 then NewBankroll = NewBankroll - Size*EntryPrice
else Size = NewBankroll/high;
if mod(Size,10) <> 0 then Size = Size - mod(Size,10);
//============
// End Program
//============
Jim's 8Trough20 Indicator (April 14,2018)
{FINDS SETUPS WHERE
1. AVG8 HAS MADE ONE OF THREE DIFFERENT TROUGHS
2. AVG8 IS CLOSE TO EITHER THE AVG20 OR AVG50 BUT IT CAN BE ABOVE OR BELOW
3. PRICE >= AVG8 AND AVG20 }
{ATTACH THIS INDICATOR TO ANY CHART. I ATTACH IT TO BOTH A DAILY AND A WEEKLY
CHART AS THE WEEKLY TROUGHS ARE ALSO INTERESTING}
{EXPERIMENT WITH THE CODE BY CHANGING THINGS LIKE FILTERING TO RESTRICT RESULTS
TO ONLY FOR RISING MOVING AVERAGES OR ONLY WHEN THE 8 PERIOD MA IS ABOVE THE
20 OR THE 50, OR ONLY ON RISING VOLUME, OR FOR TIGHTER OR LOOSER CRITPCT'S
WHICH IS THE CLOSENESS OF THE AVG8 TO EITHER TH AVG20 OR AVG50.}
inputs:
int Len8(8),
int Len20(20),
int Len50(50),
CritPct820(3),
CritPct850(1);
Variables:
bool VolUp(False),
bool Trough8A(False),
bool Trough8S(False),
bool Trough8L(False),
bool Tight820(False),
bool Tight850(False),
bool CritMet1(False),
bool CritMet2(False),
bool CritMet3(False),
int Alert1(0),
PctAway820(0),
PctAway850(0),
Avg8(0),
Avg20(0),
Avg50(0),
indate(0),
outdate(0);
Once Begin
indate = ELDate(02,16,2018);
outdate = ELDate(02,16,2018);
End;
Avg8 = AverageFC(C, len8);
Avg20 = AverageFC(C, len20);
Avg50 = AverageFC(C, len50);
{DISTANCE AVG8 IS FROM AVG20 IN PCT}
PctAway820 = Absvalue(Avg8 - Avg20)/Avg20*100;
{DISTANCE AVG8 IS FROM AVG50 IN PCT}
PctAway850 = Absvalue(Avg8 - Avg50)/Avg50*100;
{ASYMMETRICAL TROUGH}
If Avg8 > Avg8[1] and Avg8[2] < Avg8[4] then
Trough8A = True Else Trough8A = False;
{SYMMETRICAL TROUGH}
If Avg8 > Avg8[1] and Avg8[1] < Avg8[2] then
Trough8S = True Else Trough8S = False;
{LONG TROUGH}
If Avg8 > Avg8[2] and Avg8[2] < Avg8[4] then
Trough8L = True Else Trough8L = False;
{PCT DISTANCE AVG8 IS AWAY FROM AVG20 BOTH WAYS AND PRICE ABOVE BOTH}
If PctAway820 <= CritPct820 and C >= Avg8 and C >= Avg20 then
Tight820 = True else Tight820 = False;
{PCT DISTANCE AVG8 IS AWAY FROM AVG50 BOTH WAYS AND PRICE ABOVE BOTH}
If PctAway850 <= CritPct850 and C >= Avg8 and C >= Avg50 then
Tight850 = True else Tight850 = False;
{VOLUME INCREASE}
VolUp = Volume > Volume[1];
CritMet1 = Trough8S and Tight820 and VolUp;
CritMet2 = Trough8A and Tight820 and VolUp;
CritMet3 = Trough8L and Tight850 and VolUp;
{ALERT CRITERION:}
If CritMet1 or Critmet2 or Critmet3 then
Begin
If Critmet1 then alert1 = 1;
If CritMet2 then alert1 = 2;
If CritMet3 then alert1 = 3;
End Else
Begin
Alert1 = 0;
End;
plot1(alert1, "Trough");
{if Date >= indate and date <= outdate then print(date, " close ", close,
" Avg8 ", avg8, " Avg81 ", Avg8[1], " Avg82 ", avg8[2],
" Avg84 ", Avg8[4], " Avg20 ", Avg20);}
{if Date >= indate and date <= outdate then print(date, " close ", close,
" CM1 ", Critmet1, " CM2 ", Critmet2, " CM3 ", Critmet3);}
Jim's Symbol Quote Indicator (April 14, 2018)
{TO RUN THIS INDICATOR, THE EXCEL FILE "c:\ExcelDemo_SDTG.xls" MUST EXIST IN THE INDICATED FOLDER
THE FILE HAS BEEN SENT ALONG WITH THIS INDICATOR. MAKE SURE THAT THE FIRST SHEET IN THIS EXCEL
FILE WORKBOOK IS CALLED "Demo"}
{AT THE BOTTOM OF THIS EL SCRIPT, LOOK CLOSELY AND YOU WILL SEE A BAR WHICH CAN BE GRABBED AND
PULLED UP, EXPOSING THE TWO OBJECTS ATTACHED TO THE SCRIPT. THE DEFAULT FORM FOR THESE OBJECTS
An BE VIEWED BY CLICKING ON THE OBJECT AND THEN CLICKING ON THE "PROPERTIES" TAB ON THE RIGHT
SIDE OF THE ENVIRONMENT WINDOW, USUALL SHOWN RIGHT ABOVE THE DICTIONARY. HERE YOU WILL SEE THE
ABOVE NOTED FILE PATH, BUT NOTHING HAS TO BE DONE HERE. }
{JUST CREATE A CHART FOR ANY SYMBOL. USE DAILY BARS BUT IT MIGHT NOT MAKE ANY DIFFERENCE. THEN
INSERT THIS INDICATOR ON THE CHART, BUT BE SURE THAT THE EXEL FILE EXISTS FIRST. THEN WHENEVER YOU
ENTER A POSITION, THE EXCEL FILE WILL BE OPENED AUTOMATICALLY AND THIS AND ALL OTHER POSITIONS
SHOULD BE SHOWN IN THE SPREADSHEET ALONG TWITH MARKETPOSITION, TOTAL MARKET POSITION, AND YOUR
CURRENT OPEN POSITION PROFIT/LOSS, AND ALL OF THESE ITEMS IN THE SPREADSHEET WILL UPDATE ON THE
TICK.}
{IF HAVE EXPERIENCED LOSING THE LINK BETWEEN EL AND EXEL FOR THIS INDICATOR AND TS SUPPORT IS
LOOKING INTO THIS.}
Var:
intrabarpersist it(0),
WBTab("Demo");
{ called when any PositionsProvider value changes }
method void PosP_Updated2( elsystem.Object sender, tsdata.trading.PositionUpdatedEventArgs args )
begin
{display positions in Excel up to maximum number found }
for it = 0 to PosP.Count - 1
begin
WkBk[WBTab].Cells[2, 5 + it] = PosP[it].Symbol;
WkBk[WBTab].Cells[3, 5 + it] = PosP[it].Quantity;
WkBk[WBTab].Cells[4, 5 + it] = PosP[it].AveragePrice;
WkBk[WBTab].Cells[6, 5 + it] = PosP[it].MarketValue;
WkBk[WBTab].Cells[7, 5 + it] = PosP[it].OpenPL;
WkBk[WBTab].Cells[8, 5 + it] = PosP[it].AccountID;
end;
{ display blank cells to handle closed positions }
{LOOP IS DONE SO JUST REMOVE THE LAST POSITION AS UPDATE }
WkBk[WBTab].Cells[2, 5 + it ] = "";
WkBk[WBTab].Cells[3, 5 + it ] = "";
WkBk[WBTab].Cells[4, 5 + it ] = "";
//WkBk[WBTab].Cells[5, 5 + it ] = "";
WkBk[WBTab].Cells[6, 5 + it ] = "";
WkBk[WBTab].Cells[7, 5 + it ] = "";
WkBk[WBTab].Cells[8, 5 + it ] = "";
end;
Jim's Excel Spresdsheet, to be used with the indicator above. (April 18, 2018)
Below is a link to video Easy language Lesson #1 Syntax
https://drive.google.com/file/d/18q5R8tW2Sd-T4JQSkj0ZVab3dKjoXajG/view?usp=sharing