Renko MT4

Dom173

New member
The idea is the deviations are 1.3 (65%)and 2(98%) of prices. Prices breaking into or above or below these zones (red and Green) are extended and may signal a reversal soon. There is a safe holding zone in light gray for buys and dark gray for sells. Can trade on breaks of 1.3 line or once you are in a move up or down you can hold till safe zones are exited. Threw in some arrows for all the arrow fans.

Just be careful when price closes outside the bands. Instead of reversing it may ride the bands up or down.

ofL6ISy.png


Code:
# Enhanced Standard Deviation Bands by Horserider 9/21/2019
# Two standard TD Ameritrade IP Company, Inc. (c) 2019 StandardDeviation studies      combined into one study with deviations being 1.3 and 2.0 . User changeable length, dev, and avg type to suit their trading.
#
# Inner bands
input length = 20;
input numDevDn = -1.3;
input numDevUp = 1.3;
input averageType = AverageType.EXPONENTIAL;

def avg = MovingAverage(averageType, close);
def expDev = ExpAverage(AbsValue(avg - close), length);

plot UpperBand = avg + numDevUp * expDev;
plot MidLine = avg;
plot LowerBand = avg + numDevDn * expDev;

UpperBand.SetDefaultColor(GetColor(1));
MidLine.SetDefaultColor(GetColor(1));
MidLine.SetStyle(Curve.SHORT_DASH);
LowerBand.SetDefaultColor(GetColor(1));

# Outer bands
input lengthob = 20;
input numDevDnob = -2.0;
input numDevUpob = 2.0;
input averageTypeob = AverageType.EXPONENTIAL;

def avgob = MovingAverage(averageTypeob, close);
def expDevob = ExpAverage(AbsValue(avgob - close), lengthob);

plot UpperBandob = avgob + numDevUpob * expDevob;
#plot MidLineob = avgob;
plot LowerBandob = avgob + numDevDnob * expDevob;

UpperBandob.SetDefaultColor(GetColor(1));
#MidLineob.SetDefaultColor(GetColor(1));
#MidLineob.SetStyle(Curve.SHORT_DASH);
LowerBandob.SetDefaultColor(GetColor(1));


# Clouds for safe zones Light gray for long, dark gray for short.
AddCloud (midline,upperbandob, Color.lIGHT_GRAY, Color.lIGHT_GRAY);
AddCloud(midline, lowerband, Color.GRAY, Color.GRAY);

# Clounds for areas of possible reversals. Green for longs, red for shorts.
AddCloud( upperband,upperbandob, Color.LIGHT_RED, Color.LIGHT_RED);
AddCloud( lowerband,lowerbandob, Color.LIGHT_GREEN, Color.LIGHT_GREEN);

# Plot arrows for close crosses of Deviation lines. Indside plum, Outside red/green Arrows included because many like arrows. I suggest being careful following any arrow signal.
plot UpSignalob =  close crosses below   lowerbandob ;
plot DownSignalob = close crosses above upperbandob;

plot UpSignal =  close crosses   lowerband ;
plot DownSignal = close crosses  upperband;

UpSignal.SetDefaultColor(Color.PLUM);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.PLUM);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

UpSignalob.SetDefaultColor(Color.UPTICK);
UpSignalob.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignalob.SetDefaultColor(Color.DOWNTICK);
DownSignalob.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

looks awesome @horserider .. does this indicator repaint? I used to use a similar strategy with TriangularMA and ATR but it repainted which wasn't ideal.. see image below.. I used renko bars with a fast MA line.. when the price crossed the middle outer band, it signaled an entry. I also used PSAR to confirm reversals. Some other indicators also if you care to discuss. I haven't been able to recreate it in TOS yet. What are your thoughts?

2izeyWb.jpg
 
Not used Renko bars. That strategy is good if you are profitable using it. Not something I would like but that is just personal preference.
I looked at some renko charts. Trends show nicely. I may watch them a bit.
 
@Dom173 is that MT4 or MT5? If MT4 would you mind sharing the ex4 for the bands? I don't want to code them over (lazy I know)

Sure @tradebyday I don't mind sharing.. as long as you let me know how you get on.. @horserider you're welcome to have a look too so you can perhaps compare the triangular MA to the deviation bands... I also think you'll like renkos once you've had a chance to tweak them to a favorable setting.. (also note i was using this strategy to trade currencies originally)

I tend to use the following settings:
median renko 20.0 (0.2 retracement, 14 ATR period)
3 FastTMALine (ATR multipliers 1.5, 2, 2.5)
stoch color candles
MA (2)
TMA Half Length 100
TMA Price 0
TMA ATR Length 500
TMA ATR Multiplier 2.0


ENTER
MA (2) touches outer FastTMA line (ATR multiplier 2)

EXIT
MA (2) touches center FastTMA line

see the link for the .ex4 and .tpl files... let me know what you find and if you need anything else. I'm only on Mac at the time being so not able to load any of the files myself..

https://we.tl/t-fntPoDSZE5
 
Last edited:
@Dom173 appreciate the share, and I had never heard of WeShare but I will be keeping them in my back pocket as well haha. Two questions. 1) What do you mean by "as long as you let me know how you get on"? Just genuinely confused by the statement. 2) I noticed there was an EA in the file but as a .tpl format. So does that run, and if so, is it the entire strategy or just another piece of the puzzle?... Ok maybe that is technically three questions haha. But just to make you aware, I enjoy testing out new things, new ideas and searching for something that screams "I'm done!" So I am stockpiling indicators, ideas, and data overall that I hope leads to something truly worthwhile. MT4 has the added bonus of EA's (trading robots for others reading) which i am curious about applying to FX in the future
 
@Dom173 appreciate the share, and I had never heard of WeShare but I will be keeping them in my back pocket as well haha. Two questions. 1) What do you mean by "as long as you let me know how you get on"? Just genuinely confused by the statement. 2) I noticed there was an EA in the file but as a .tpl format. So does that run, and if so, is it the entire strategy or just another piece of the puzzle?... Ok maybe that is technically three questions haha. But just to make you aware, I enjoy testing out new things, new ideas and searching for something that screams "I'm done!" So I am stockpiling indicators, ideas, and data overall that I hope leads to something truly worthwhile. MT4 has the added bonus of EA's (trading robots for others reading) which i am curious about applying to FX in the future

No worries at all... "as long as you let me know how you get on" just meant keep me posted on your progress as I'm interested.. to answer your other questions, yes there was also an EA that was a part of the project I was working on. I can send you that file also if you're interested. I sent the template in hopes that it would allow you to load all the indicators but as I said I'm rusty on the mt4 stuff nowadays.. I too was in search of a holy grail strategy when I set out on this project...

Just FYI, the premise behind the strategy is just using the fast MA (2) and the renko bars and TMA lines. When the fast MA crosses the 2nd outer TMA lane, it signals an entry. Then for every 10 pips outside that entry, is another entry (averaging down) for as many times as you select. Then the exit is signaled either at the middle TMA line or the opposite side 1st outer band. The extra indicators, like the RSI and the w3a deviation were used to signal a good entry point by confirming the end of the trend and a reversal point to try and eliminate averaging down and just have 1 entry at the w3A "3" confirmation and when the RSI is overbought or oversold.

In hind sight, the TMA bands are gorgeous to look at but in real-time the downfall is that they repaint so they are not as accurate as they seem (hence my interest in this thread - a similar indicator that doesn't repaint, but it turns out is not as sexy). At the time I also tried bollinger bands and donchian channels. TMAs work great but not to perfection as it seems like it would when you look back at a chart. The EA may also not be the best to use, perhaps manually trading the strategy will work better but I haven't had time to test that theory. That is why I am willing to share this info and the files for free (I paid quite a fair amount originally to have the strategy coded and tested multiple rounds).

anyway, the indicators you need are the following:
1) renko bars
2) stochastic color candles
3) w3a deviation
4) triangularMA
5) MA (2)
6) ParabolicSAR
7) StochasticRSI

Here is a photo of the EA inputs:
C18uKIv.jpg


Here is a link to the EA:
https://we.tl/t-9oBYwn9oDY
Let me know how you make out or your thoughts & questions.. wouldn't mind screenshots also.. would be cool to see this work again
 
@Dom173 I'll check it out. Got the TMAcentered running and already off first glance I see a way to run a system with it alone. When I first load it it just as 1 center line and 1 outer line on each side like a basic channel. But what I noticed, on a 15min chart, if you entered when price hit one of the outer lines and then exit at center line, the win percentage is extremely high, and most losses are not very big or near break even. Now I don't know if the 15-50 pips approx 2 times a day on most pairs covers all the fees and slippage, but I was really impressed and want to make that an EA of its own to run for experimentation. Been taking on a lot of projects at once so I need to make a list and tackle each one individually but I will try to let you know how everything fairs
 
@Dom173 I'll check it out. Got the TMAcentered running and already off first glance I see a way to run a system with it alone. When I first load it it just as 1 center line and 1 outer line on each side like a basic channel. But what I noticed, on a 15min chart, if you entered when price hit one of the outer lines and then exit at center line, the win percentage is extremely high, and most losses are not very big or near break even. Now I don't know if the 15-50 pips approx 2 times a day on most pairs covers all the fees and slippage, but I was really impressed and want to make that an EA of its own to run for experimentation. Been taking on a lot of projects at once so I need to make a list and tackle each one individually but I will try to let you know how everything fairs

sounds good.. you can also tweak the EA I sent you and the work is done.. just set all the other inputs to "false".. dont forget to send screenshots. look forward to seeing the progress..

wonder if I can get someone here to code the TMA bands for TOS
 
@Dom173 I'll have to figure out how to get images up but definitely will do! The TMA bands would be a generally easy code to form. The main thing is having the math for the center line accurate, then just input a plot for something like "plot upperline = centerline + q" where q = ATR factor x ATR , then vice versa for lower line
 
@Dom173 I'll have to figure out how to get images up but definitely will do! The TMA bands would be a generally easy code to form. The main thing is having the math for the center line accurate, then just input a plot for something like "plot upperline = centerline + q" where q = ATR factor x ATR , then vice versa for lower line

awesome.. that's out of my depths a bit but if you or someone else is willing to help I'd appreciate that.

the tutorial to upload images by BenTen is here:
https://usethinkscript.com/threads/how-to-insert-image-in-a-post-thread.277/post-1609
 
hi @Dom173,

thanks for sharing, i think we are all willing to piece this strategy and turn it native tos. more than happy to try to help, using renko in ToS, sure we can come up with a compatible strategy.

We will need to triage the studies 1) are they available in ToS, 2) are they similar and meet strategy requirements, if not, what will it take to develop or find an alternate replacement, to start:

1) renko bars
2) stochastic color candles
3) w3a deviation
4) triangularMA
5) MA (2)
6) ParabolicSAR
7) StochasticRSI
 
@horserider that does not look too far off from how it is supposed to function, though I would recommend running it on things that run ON, like FX or futures, to get a smoothed out motion in the chart. Stocks just gap too much for a proper chart IMO
 
I appreciate that.. from what I can tell renko bars work in ToS. after that it's just PSAR and stochastic RSI that work. The MA isn't quite as smooth as it needs to be, and I haven't found anything like w3a deviation. @horserider seems to have found a similar setup for TMA and ATR bands but now sure how comparable it is - also needs to be multiple ATR multiplier setups (1.5x, 2x, 2.5x) so that there are 3 bands. Then to find some sort of indicator for reversals outside of the bands (originally the w3a deviation marker).

@tradebyday may also be onto something with the following statement:

I would recommend running it on things that run ON, like FX or futures, to get a smoothed out motion in the chart. Stocks just gap too much for a proper chart IMO

@tradebyday have you tested this theory?
 
I appreciate that.. from what I can tell renko bars work in ToS. after that it's just PSAR and stochastic RSI that work. The MA isn't quite as smooth as it needs to be, and I haven't found anything like w3a deviation. @horserider seems to have found a similar setup for TMA and ATR bands but now sure how comparable it is - also needs to be multiple ATR multiplier setups (1.5x, 2x, 2.5x) so that there are 3 bands. Then to find some sort of indicator for reversals outside of the bands (originally the w3a deviation marker).

@tradebyday may also be onto something with the following statement:



@tradebyday have you tested this theory?I
I would like to try the renko bars @Dom173? Can you share file
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
216 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top