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: 22nd November 2024.   BTC flirts with $100K, Stocks higher, Eurozone PMI signals recession risk.   Asia & European Sessions:   Geopolitical risks are back in the spotlight on fears of escalation in the Ukraine-Russia after Russia reportedly used a new ICBM to retaliate against Ukraine’s use of US and UK made missiles to attack inside Russia. The markets continue to assess the election results as President-elect Trump fills in his cabinet choices, with the key Treasury Secretary spot still open. The Fed’s rate path continues to be debated with a -25 bp December cut seen as 50-50. Earnings season is coming to an end after mixed reports, though AI remains a major driver. Profit taking and rebalancing into year-end are adding to gyrations too. Wall Street rallied, led by the Dow’s 1.06% broadbased pop. The S&P500 advanced 0.53% and the NASDAQ inched up 0.03%. Asian stocks rose after  Nvidia’s rally. Nikkei added 1% to 38,415.32 after the Tokyo inflation data slowed to 2.3% in October from 2.5% in the prior month, reaching its lowest level since January. The rally was also supported by chip-related stocks tracked Nvidia. Overnight-indexed swaps indicate that it’s certain the Reserve Bank of New Zealand will cut its policy rate by 50 basis points on Nov. 27, with a 22% chance of a 75 basis points reduction. European stocks futures climbed even though German Q3 GDP growth revised down to 0.1% q/q from the 0.2% q/q reported initially. Cryptocurrency market has gained approximately $1 trillion since Trump’s victory in the Nov. 5 election. Recent announcement for the SEC boosted cryptos. Chair Gary Gensler will step down on January 20, the day Trump is set to be inaugurated. Gensler has pushed for more protections for crypto investors. MicroStrategy Inc.’s plans to accelerate purchases of the token, and the debut of options on US Bitcoin ETFs also support this rally. Trump’s transition team has begun discussions on the possibility of creating a new White House position focused on digital asset policy.     Financial Markets Performance: The US Dollar recovered overnight and closed at 107.00. Bitcoin currently at 99,300,  flirting with a run toward the 100,000 level. The EURUSD drifts below 1.05, the GBPUSD dips to June’s bottom at 1.2570, while USDJPY rebounded to 154.94. The AUDNZD spiked to 2-year highs amid speculation the RBNZ will cut the official cash rate by more than 50 bps next week. Oil surged 2.12% to $70.46. Gold spiked to 2,697 after escalation alerts between Russia and Ukraine. Heightened geopolitical tensions drove investors toward safe-haven assets. Gold has surged by 30% this year. Haven demand balanced out the pressure from a strong USD following mixed US labor data. Silver rose 0.9% to 31.38, while palladium increased by 0.9% to 1,040.85 per ounce. Platinum remained unchanged. 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. Andria Pichidi 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 FX and CFDs 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.
    • A few trending stocks at support BAM MNKD RBBN at https://stockconsultant.com/?MNKD
    • BMBL Bumble stock watch, pull back to 7.94 support area with high trade quality at https://stockconsultant.com/?BMBL
    • LUMN Lumen Technologies stock watch, pull back to 7.43 support area with bullish indicators at https://stockconsultant.com/?LUMN
×
×
  • Create New...

Important Information

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