EasyLanguage Treasure Chest

Status
Not open for further replies.
BTW Tums, or anybody else, do you have the TRO dynamic S/R indicator? That is the name of the indicator that plots "dots" at pivots right?

Thanks for creating this thread and helping out Tums!

Very much appriciated.

veggen
 
NPP builds a Emini system
by no_pm_please

Strictly Educational!

Posted by no_pm_please:
http://elitetrader.com/vb/showthread.php?s=&threadid=82314&perpage=40&highlight=eld&pagenumber=1

So, I was flipping through the Dec./Jan. issue of Trader and came across this quote "Trade with a trend, ride the winners, cut the losers. How you do it doesn't matter" from a past market guru.

What the hell I thought, I can do that in my sleep. Let's see if it can be made into a trend following system for the emini market.

Should also work on NQ and ER2 (at least in theory).

To start out, here's the idea.

1) Use RSI as the indicator for the trend. A 50.5 reading and we should be long. A 49.5 reading and we should go short.
So the risk is the maximum of the length of time between bars and a range of 1.0 on the RSI.

2) If the market rises above 52.5 and then crosses below it, then exit any long trade. If the market drops below 47.0 and then crosses above it, then exit short trades. As long as the market runs it'll just stay in the trade. As time goes on the RSI will move in the direction of the move so it's just like having a trailing stop.

I made the short side a little lower due to short trades moving faster than long trades.

<img src=http://elitetrader.com/vb/attachment.php?s=&postid=1292409>



Code by nicknextmove
Right click... Save as... to download.
http://elitetrader.com/vb/attachment.php?s=&postid=1297822

(49)
 
Tums, is it the same language used by TradersStudio or is it a universal language as for Trading platforms (as you say it can be imported to MultiCharts, Tradestation? Thanks. :)
 
Quote from veggen:

Do anybody have the ZigZag indicator in EL codes, with the functions? :)

Code:
[color=blue]
Inputs: WavePcnt(5), Color(Yellow), Thicknes(1);
Variables: SH(0), SL(0), RP(0), RPDate(0), RPTime(0), ZigZag(0), Switcher(0), NextZig(0);

IF CurrentBar = 1 Then Begin
	RP = MedianPrice;
	RPDate = Date;
	RPTime = Time;
	NextZig = Text_New(Date, Time, 0, NumToStr(WavePcnt, 0)+"%-");
	Text_SetColor(NextZig, Color);
End;

SH = SwingHigh(1, High, 1, 2);
SL = SwingLow(1, Low, 1, 2);

IF SH  <> -1 Then Begin
	IF Switcher <> -1 AND SH >= RP * (1+(WavePcnt*.01)) Then Begin
		Condition1 = True;
		Switcher = -1;
		Condition2 = True;
	End;
	IF Condition1 = False AND Switcher = -1 AND SH >= RP Then Begin
		TL_SetEnd(ZigZag, Date[1], Time[1], SH);
		Condition2 = True;
	End;
	IF Condition2 Then Begin
		Condition2 = False;
		RP = SH;
		RPDate = Date[1];
		RPTime = Time[1];
	End;
End;

IF SL <> -1 Then Begin
	IF Switcher <> 1 AND SL <= RP - (RP*(WavePcnt*.01)) Then Begin
		Condition1 = True;
		Switcher = 1;
		Condition2 = True;
	End;
	IF Condition1 = False AND Switcher = 1 AND SL <= RP Then Begin
		TL_SetEnd(ZigZag, Date[1], Time[1], SL);
		Condition2 = True;
	End;
	IF Condition2 Then Begin
		Condition2 = False;
		RP = SL;
		RPDate = Date[1];
		RPTime = Time[1];
	End;
End;

IF Condition1 Then Begin
	Condition1 = False;
	ZigZag = TL_New(RPDate, RPTime, RP, RPDate[1], RPTime[1], RP[1]);
	TL_SetSize(ZigZag, Thicknes);
	TL_SetColor(ZigZag, Color);
	TL_SetExtRight(ZigZag, False);
	TL_SetExtLeft(ZigZag, False);
	IF False Then Plot1[1](RP, "RP");
End;

IF Switcher = 1 Then Begin
	Text_SetLocation(NextZig, Date, Time, RP * (1+(WavePcnt*.01)));
	Text_SetStyle(NextZig, 1, 2);
End;
IF Switcher = -1 Then Begin
	Text_SetLocation(NextZig, Date, Time, RP - (RP*(WavePcnt*.01)));
	Text_SetStyle(NextZig, 1, 2);
End;
[/color]
 
Quote from Derrick1983:
Tums, is it the same language used by TradersStudio or is it a universal language as for Trading platforms (as you say it can be imported to MultiCharts, Tradestation? Thanks. :)

EasyLanguage was invented by TradeStation.

It has since been adapted by a number of charting software... to various extent.
 
Quote from Tums:

EasyLanguage was invented by TradeStation.

It has since been adapted by a number of charting software... to various extent.

Easy Language has been developed by Samuel K. Tennis who was an original senior programmer for the System Writer released by Omega Research in late 80s. Later this language became a foundation for Trade Station. Easy Language is an offshoot of Pascal.
 
Status
Not open for further replies.
Back
Top