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

    • CVNA Carvana stock, nice top of range breakout at https://stockconsultant.com/?CVNA
    • GDRX GoodRx stock, good day, watch for a bottom range breakout at https://stockconsultant.com/?GDRX
    • Date: 14th February 2025.   Can The NASDAQ Maintain Momentum at Key Resistance Level?     The price of the NASDAQ throughout the week rose more than 3.00% to bring the price back up to the instrument’s resistance level. However, while taking into consideration higher inflation, tariffs and the resistance level, could the index maintain momentum?   US Inflation Rises For a 4th Consecutive Month The US Consumer Price Index, or inflation, rose for a 4th consecutive month taking the rate even further away from the Federal Reserve’s target. Analysts were expecting the US inflation rate to remain unchanged at 2.9%. However, consumer inflation rose to 3.00%, the highest since July 2024, while Producer inflation rose to 3.5%. Higher inflation traditionally triggers lower sentiment towards the stock market as investors' risk appetite falls and they prefer the US Dollar. However, on this occasion bullish volatility rose. For this reason, some traders may be considering if the price is overbought in the short term.   Addressing these statistics, US Federal Reserve Chair Jerome Powell acknowledged that the Fed has yet to achieve its goal of curbing inflation, adding further hawkish signals regarding the monetary policy. Other members of the FOMC also share this view. Today, Raphael Bostic, President of the Federal Reserve Bank of Atlanta, stated that the Fed is unlikely to implement interest rate cuts in the near future. This is due to ongoing economic uncertainty following the introduction of trade tariffs on imported goods and other policies from the Republican-led White House.   Most of the Federal Open Market Committee emphasizes additional time is needed to fully assess the situation. According to the Chicago Exchange FedWatch Tool, interest rate cuts may not start until September 2025.   What’s Driving The NASDAQ Higher? Earnings data this week has continued to support the NASDAQ. Early this morning Airbnb made public their quarterly earnings report whereby they beat both earnings per share and revenue expectations. The Earnings Per Share read 25% higher than expectations and Revenue was more than 2% higher. As a result, the stock rose more than 14%. Another company this week that made public positive earnings data is Cisco which rose by more than 2% on Thursday. Another positive factor continues to be the positive employment data. Even though the positive employment data can push back interest rate cuts, the stability in the short term continues to serve the interests of higher consumer demand. The US Unemployment Rate fell to 4.00% the lowest in 8 months. Lastly, investors are also increasing their exposure to the index due to sellers not being able to maintain control or momentum. Some economists also increase their confidence in economic growth if Trump can obtain a positive outcome from the Ukraine-Russia negotiations.   However, during Friday’s pre-US session trading, 80% of the most influential stocks are witnessing a decline. The NASDAQ itself is trading more or less unchanged. Therefore, the question again arises as to whether the NASDAQ can maintain momentum above this area.   NASDAQ - News and Technical analysis In terms of technical analysis, the NASDAQ is largely witnessing mainly bullish indications on the 2-hour chart. However, the main concern for traders is the resistance level at $21,960. On the 5-minute timeframe, the price is mainly experiencing bearish signals as the price moves below the 200-period simple moving average.   The VIX, which is largely used as a risk indicator, is currently trading 0.75% higher which indicates a lower risk appetite. In addition to this, bond yields trade 6 points higher. If both the VIX and Bond yields rise further, further pressure may be witnessed for index traders.   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.
    • LUNR Intuitive Machines stock watch, attempting to move higher off 18.64 support, target 26 area at https://stockconsultant.com/?LUNR
    • CNXC Concentrix stock watch, pullback to 47.16 triple support area with bullish indicators at https://stockconsultant.com/?CNXC
×
×
  • Create New...

Important Information

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