Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

cmrock

Sling Shot and Trend Replica

Recommended Posts

I don't write programming code, but am familiar with the indicator. It is a channel of two moving averages; the Jurik 32.4 and 61.8 period moving averages. When the 61.8 MA is sloping upward the channel is blue, and when the 61.8 MA is sloping downward the channel is red.

 

When the channel changes color (noting a MA crossover) you look for the first pullback (or retracement) into the channel. When this retracement coincides with a fibonacci signal or oscillator signal the trade is triggered.

 

The challenge for the programmer is to create the channel and color changes above.

 

Hope this helps,

Bruce

Share this post


Link to post
Share on other sites
I don't write programming code, but am familiar with the indicator. It is a channel of two moving averages; the Jurik 32.4 and 61.8 period moving averages. When the 61.8 MA is sloping upward the channel is blue, and when the 61.8 MA is sloping downward the channel is red.

 

When the channel changes color (noting a MA crossover) you look for the first pullback (or retracement) into the channel. When this retracement coincides with a fibonacci signal or oscillator signal the trade is triggered.

 

The challenge for the programmer is to create the channel and color changes above.

 

Hope this helps,

Bruce

 

 

Your statements above are contradicting. The first paragraph say the channel change color depending on the slope of the 61.8 MA and the second paragraph say the color changes on a MA crossover.

 

Looking at the screenprints in the PDF, this is obvious that the channel change color based on the MA crossovers. The method also use the DDF indicator which you do not mention in your post.

 

I don't know if the method has any value, but I think if someone really want to understand it, the best way would be to look at the webinar and review the attached pdf. This is clear that based on some of the responses, that things already are getting lost in translation.

Share this post


Link to post
Share on other sites

Thank you for sharing Sevensa. You are right, the color change is a result of the moving average crossover. And you want to trade in the direction of the slope of the 61.8 MA.

 

Combine the crossover with a -8 value chart reading and a fib retracement between 50% and 61.8% and you have a greater then 85% chance of hitting a first target of 8 mini-DOW points.

 

Can you write code for the crossover with color change?

 

Hope this helps,

Bruce

slingshot.thumb.jpg.4e058e0e00eb3cb82b8b3f4ff5f764d0.jpg

slingshotplus.thumb.jpg.6010f02ae86de77c4ebfdfae32dcbf1b.jpg

Share this post


Link to post
Share on other sites

Can you write code for the crossover with color change?

 

I don't have Jurik's MA's, so I have used EMA's. If you don't like the coloring between the lines, change the PlotFill parameter to FALSE. I am using MC, so I cannot post an ELD. I believe you can just copy and paste the below into PowerEditor and it should work for Tradestation.

 

 

Inputs: 	LongAvg(61.8), 
	MediumAvg(38.2), 
	ShortAvg(5),
	UpColor(Blue),
	DownColor(Red),
	PlotFill(True);

Vars:	LongMA(0),
MediumMA(0),
ShortMA(5),
Color(White),
TLUp(0),
TLDown(0);

LongMA = XAverage(Close,LongAvg);
MediumMA = XAverage(Close,MediumAvg);
ShortMA = XAverage(Close, ShortAvg);

If MediumMA >= LongMA then begin
Color = UpColor;
Plot1(MediumMA, "MediumMA", Color, Default, 1);
Plot2(LongMA, "LongMA", Color, Default, 3);

If PlotFill then begin
	TLUp = TL_new(date, time,MediumMA, date,time,LongMA);
	TL_SetStyle(TLUp,1);
	TL_SetColor(TLUp,UpColor);
end;
end
else begin
Color = DownColor;
Plot1(MediumMA, "MediumMA", Color, Default, 1);
Plot2(LongMA, "LongMA", Color, Default, 3);

If PlotFill then begin
	TLDown = TL_new(date, time,MediumMA, date,time,LongMA);
	TL_SetStyle(TLDown,1);
	TL_SetColor(TLDown,DownColor);
end;
end;	

MAChannel.thumb.png.541fa7709679b3da414af6a713ad77f1.png

Share this post


Link to post
Share on other sites

Thank you Sevensa. You just saved these guys about $400, lol. I can't believe JC can sell a moving average indicator for that price, it is amazing what a catchy name and a little marketing can do.

 

Attached please find two versions of the Slingshot. The one shown below in the lower panel is Sevensa's version with trendlines as histograms. I would rather use plots in TS for something like that as it is about 10x faster in code speed and the plots are a little cleaner. I would also use jtHMA (Hull Moving Average, open source) as the moving average instead of EMA - I took the liberty of changing the code; there is still an input option for using EMA.

 

The second version is similar except it used plot histogram and jtHMA plus an option for Bollinger band around the 'medium MA' with the option of turning off the plots.

 

These 2 indicators are named as ^TTMSlingShot

 

attachment.php?attachmentid=8629&stc=1&d=1227417917

TTMSlingshot_test.thumb.gif.3ef1b3f575f777080f3b9a3c2d06864b.gif

^TTMSLINGSHOT_2.ELD

Edited by thrunner
explain what is jtHMA

Share this post


Link to post
Share on other sites

Hello thrunner,

 

First of all, thank you.

 

I installed and verified both slingshots, but am getting error messages with the "_sv" version (see attachment).

 

I've decided to use the ^TTMSlingShot and set the "use BB" to "false" and it works great.

 

Also, I am interested in writing Easy Language code, can you recommend any resources to get me started?

 

Many thanks,

Bruce

thrunnererror.thumb.jpg.86dccb363888f6cf7970a164c6d0ef38.jpg

Share this post


Link to post
Share on other sites

Not sure about the floating point error. You may have some spurious data problem with 'Close' of @YM that caused the jtHMA function to fail - not sure, just a guess, try Ctrl-R to reload data or try a smaller number of bars back (try 1500) or try earlier start date for the data.

 

Here are some links and references that may be helpful to you if you are just beginning to learn EasyLanguage:

 

Introduction to EasyLanguage Tutorial

 

Introduction to EasyLanguage Online Seminar

 

EasyLanguage Books ("Getting Started with TradeStation EasyLanguage", “TradeStation EasyLanguage Reference Guide", and “EasyLanguage Boot Camp”)

 

EasyLanguage FAQ

 

List of EasyLanguage Reference Posts

 

Seminar Schedule

 

Demonstration Code: A source of demonstration code is the EasyLanguage “work area”, the body of strategies and analysis techniques the EasyLanguage code for which is included in TradeStation. This code can be opened and reviewed any time by following the File -> Open EasyLanguage Document menu sequence.

 

Third-Party EasyLanguage Specialists Directory (This link takes you to a web page hosted by TradeStation Technologies, Inc., an affiliate of TradeStation Securities, Inc.)

Share this post


Link to post
Share on other sites
Thank you Sevensa. You just saved these guys about $400, lol. I can't believe JC can sell a moving average indicator for that price, it is amazing what a catchy name and a little marketing can do.

 

Attached please find two versions of the Slingshot. The one shown below in the lower panel is Sevensa's version with trendlines as histograms. I would rather use plots in TS for something like that as it is about 10x faster in code speed and the plots are a little cleaner. I would also use jtHMA (Hull Moving Average, open source) as the moving average instead of EMA - I took the liberty of changing the code; there is still an input option for using EMA.

 

The second version is similar except it used plot histogram and jtHMA plus an option for Bollinger band around the 'medium MA' with the option of turning off the plots.

 

These 2 indicators are named as ^TTMSlingShot

 

attachment.php?attachmentid=8629&stc=1&d=1227417917

 

I have been testing this indicator and I want to make a change but I am challanged when it comes to programing. Could you make an adjustment to this for a straight 10 & 20 EMA instead of the jtHMA.

 

BTW I like the addition of the BB to the indicator.

 

Thanks

Share this post


Link to post
Share on other sites

This is probably what you want:

 

^TTMSlingShot_SvE 10 and 20 EMA w BB

 

Basically you are using faster periods (10, 20) on a slower Moving Average (EMA) versus slower periods (32.4, 61.8) on a faster MA (jtHMA).

 

Using the Sevensa (_Sv) version of eld here because that has less problem with TS candlestick plots than the non-Sv version.

attachment.php?attachmentid=8668&stc=1&d=1227899502

TTMSLINGSHOT_SVE.ELD

5aa70e9cd2383_TTMSlingShot_SvE.gif.5c0a284e2d4bfadbcf85fef21dc8555e.gif

Share this post


Link to post
Share on other sites
This is probably what you want:

 

^TTMSlingShot_SvE 10 and 20 EMA w BB

 

Basically you are using faster periods (10, 20) on a slower Moving Average (EMA) versus slower periods (32.4, 61.8) on a faster MA (jtHMA).

 

Using the Sevensa (_Sv) version of eld here because that has less problem with TS candlestick plots than the non-Sv version.

attachment.php?attachmentid=8668&stc=1&d=1227899502

 

Thanks, I will give it a shot.

 

Have a great day

Share this post


Link to post
Share on other sites
This is probably what you want:

 

^TTMSlingShot_SvE 10 and 20 EMA w BB

 

Basically you are using faster periods (10, 20) on a slower Moving Average (EMA) versus slower periods (32.4, 61.8) on a faster MA (jtHMA).

 

Using the Sevensa (_Sv) version of eld here because that has less problem with TS candlestick plots than the non-Sv version.

attachment.php?attachmentid=8668&stc=1&d=1227899502

 

One more time if you could. I have Jiriks MA installed on my machine, below is the code for the MA assuming you have JMA installed (which I do), could you modify the code to allow me to have the same outlook with the Jarik MA

 

{

DESCRIPTION:

 

Plots JMA on price time series.

User has option to enable dynamic coloring.

This indicator shows best on a black background.

 

INPUTS:

 

series price time series

length larger values makes JMA line smoother

phase specifies tradeoff between lag and overshoot

colorMode 0 : plot JMA line without dynamic color.

1 : plot JMA line with dynamic color.

 

}

 

Inputs:

series(close),

length(7), { range: any non-negative value }

phase(50), { range: -100 ... +100 }

colorMode(0); { range: 0, 1 }

 

vars:

float JMA(0);

 

JMA = JRC.JMA.2k ( series, length, phase ) ;

{ JMA = JRC.JMA.flex.2k ( value1, length, phase ); --- alternate method for user defined variables }

 

if colorMode = 1 then setplotcolor[1](1, iff( JMA<JMA[1], red, cyan ) );

plot1 (JMA, "JMA");

 

 

Thanks

Share this post


Link to post
Share on other sites

I don't use the Jurik, so I won't be able to include the ELD, however you can edit the code and verify it on your TS setup by doing the following.

 

1. Under the Input section, add:

Inputs: LongAvg(20),

MediumAvg(10),

ShortAvg(5),

Phase (50),

 

2. Under the code .. If UseXAve change:

If UseXAve then begin

LongMA = JRC.JMA.2k(Close,LongAvg, phase);

MediumMA = JRC.JMA.2k(Close,MediumAvg, phase);

ShortMA = JRC.JMA.2k(Close, ShortAvg, phase);

end else begin

LongMA = jtHMA(Close,LongAvg);

MediumMA = jtHMA(Close,MediumAvg);

ShortMA = jtHMA(Close, ShortAvg);

end;

 

Alternatively....

The following code should verify properly if you have Jurik properly installed. To create the new indicator by clicking on the 'EasyLanguage' icon on the left panel and choose create new EL document, then choose new indicator and name it something like 'TTMSlingShot_J'. Select all the code below and paste it in place of the new EL document. Then press F3 to verify. Apply the new indicator onto a chart. Notice that the UseXAve input is by default to 'true' and now uses the Jurik moving average.

// re:  traderslaboratory.com/forums/f46/ttm-sling-shot-and-trend-4929.html
// F Svensa
// ^TTMSlingshot_J  using Jurik MA		//JRC.JMA.2k ( series, length, phase ) ;

Inputs: LongAvg(20), 
	MediumAvg(10), 
	ShortAvg(5),
	Phase (50),
	UpColor(Blue),
	DownColor(Red),
	UseXAve (True),
	PlotFill(True);
inputs: 
UseBB(True), 
BBLength( 30), 
NumDevsUp( 2), 
NumDevsDn( -2);

variables: 
Avg( 0 ), 
SDev( 0 ), 
LowerBand( 0 ), 
UpperBand( 0 ) ; 


Vars:	LongMA(0),
MediumMA(0),
ShortMA(5),
Color(White),
TLUp(0),
TLDown(0);

If UseXAve then begin	
 LongMA = JRC.JMA.2k(Close,LongAvg, phase);
 MediumMA = JRC.JMA.2k(Close,MediumAvg, phase);
 ShortMA = JRC.JMA.2k(Close, ShortAvg, phase);
end else begin
 LongMA = jtHMA(Close,LongAvg);
 MediumMA = jtHMA(Close,MediumAvg);
 ShortMA = jtHMA(Close, ShortAvg);
end;

//AverageFC( SShot, BBLength ) ; 
SDev = StandardDev( MediumMA, BBLength, 1 ) ; 
UpperBand = MediumMA + NumDevsUp * SDev ; 
LowerBand = MediumMA + NumDevsDn * SDev ; 

If UseBB then  
begin 
Plot4( UpperBand, "UpperBand" ) ; 
Plot5( LowerBand, "LowerBand" ) ; 
End; 


Plot3(ShortMA, "ShortMA", White, Default, 0);
If MediumMA >= LongMA then begin
Color = UpColor;
Plot1(MediumMA, "MediumMA", Color, Default, 1);
Plot2(LongMA, "LongMA", Color, Default, 3);

If PlotFill then begin
	TLUp = TL_new(date, time,MediumMA, date,time,LongMA);
	TL_SetStyle(TLUp,1);
	TL_SetColor(TLUp,UpColor);
end;
end
else begin
Color = DownColor;
Plot1(MediumMA, "MediumMA", Color, Default, 1);
Plot2(LongMA, "LongMA", Color, Default, 3);

If PlotFill then begin
	TLDown = TL_new(date, time,MediumMA, date,time,LongMA);
	TL_SetStyle(TLDown,1);
	TL_SetColor(TLDown,DownColor);
end;
end;

Share this post


Link to post
Share on other sites
Thank you Sevensa. You just saved these guys about $400, lol. I can't believe JC can sell a moving average indicator for that price, it is amazing what a catchy name and a little marketing can do.

 

Attached please find two versions of the Slingshot. The one shown below in the lower panel is Sevensa's version with trendlines as histograms. I would rather use plots in TS for something like that as it is about 10x faster in code speed and the plots are a little cleaner. I would also use jtHMA (Hull Moving Average, open source) as the moving average instead of EMA - I took the liberty of changing the code; there is still an input option for using EMA.

 

The second version is similar except it used plot histogram and jtHMA plus an option for Bollinger band around the 'medium MA' with the option of turning off the plots.

 

These 2 indicators are named as ^TTMSlingShot

 

attachment.php?attachmentid=8629&stc=1&d=1227417917

 

I have Trade Station 2000i , that does,t support .ELD files but only .ELA files Can You kindly tell me, how can i utilise or tralslate eld files in ela files?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.