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.


  • Topics

  • Posts

    • Date: 31st March 2025.   Trump Confirms Tariffs on All Countries, Sending Stocks Lower.   The NASDAQ continues to trade lower due to the US confirming the latest tariffs will be on all countries. In addition to this, bearish volatility also is largely due to the higher inflation data from Friday. The NASDAQ declines to its lowest price since September 11th 2024. Core PCE Price Index - Inflation Increases Again! The PCE Price Index read 2.5% aligning with expert forecasts not triggering any alarm bells. However, the Core PCE Price Index rose from 0.3% to 0.4% MoM and from 2.7% to 2.8% YoY, signalling growing inflationary pressure. This increases the likelihood that the Federal Reserve will maintain elevated interest rates for an extended period. The NASDAQ fell 2.60% due to the higher inflation reading which is known to pressure the stock market due to pressure on consumer demand and a more hawkish Federal Reserve. Boston Fed President Susan Collins recently commented that tariffs could drive up inflation, though the long-term impact remains uncertain. She told journalists that a short-term spike is the most probable outcome but believes the current pause in monetary policy adjustments is appropriate given the prevailing uncertainties. Although, certain investment banks such as JP Morgan actually believe the Federal Reserve will be forced into cutting rates. This is due to expectations that the economy will struggle under the new trade policy. For example, JP Morgan expects the Federal Reserve to delay rate cuts but will quickly cut towards the end of 2025. Market Risk Appetite Takes a Hit! A big factor for the day is the drop in the risk appetite of investors. This can be seen from the VIX which is up almost 6%, Gold which is trading 1.30% higher and the Japanese Yen which is the day’s best performing currency. Most safe haven assets, bar the US Dollar, increase in value. It is also worth noting that all indices are decreasing in value during this morning's Asian session with the Nikkei225 and NASDAQ witnessing the strongest decline. Previously the stock market rose in value as investors heard rumours that tariffs would only be on certain countries. This bullish swing occurred between March 14th and 25th. Over the weekend, President Donald Trump indicated that the upcoming tariffs would apply to all countries, not just those with the largest trade imbalances with the US. NASDAQ - Technical Analysis In terms of technical analysis, the NASDAQ continues to obtain indications that sellers control the price action. The price opens on a bearish price gap measuring 0.30% and trades below all Moving Averages on all timeframes. The NASDAQ also trades below the VWAP and almost 100% of the most influential components (stocks) are declining in value.     The next significant support level is at $18,313, and the resistance level stands at $20,367.95. Key Takeaway Points: NASDAQ falls to its lowest since September 2024 as the US confirms tariffs on all countries, adding to inflation concerns. Core PCE inflation rises to 0.4% MoM and 2.8% YoY, increasing the likelihood of prolonged high interest rates. Investor risk appetite drops as VIX jumps 6%, gold gains 1.3%, and safe-haven assets outperform. NASDAQ shows strong bearish momentum, trading below key technical levels with support at $18,313 and resistance at $20,367.95. Always trade with strict risk management. Your capital is the single most important aspect of your trading business.   Please note that times displayed based on local time zone and are from time of writing this report.   Click HERE to access the full HFM Economic calendar.   Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE!   Click HERE to READ more Market news.   Michalis Efthymiou HFMarkets   Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in Leveraged Products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • PM Philip Morris stock, top of range breakout at https://stockconsultant.com/?PM
    • EXC Exelon stock, nice range breakout at https://stockconsultant.com/?EXC
    • UTZ Utz Brands stock, watch for a bottom breakout at https://stockconsultant.com/?UTZ
    • FL Foot Locker stock, nice breakdown follow through at https://stockconsultant.com/?FL
×
×
  • Create New...

Important Information

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