Innocent Heikin Ashi Ethereum StrategyHello there, im back!
If you are familiar with my previous scripts, this one will seem like the future's nostalgia!
Functionality:
As you can see, all candles are randomly colored. This has no deeper meaning, it should remind you to switch to Heikin Ashi. The Strategy works on standard candle stick charts, but should be used with Heikin Ashi to see the actual results. (Regular OHLC calculations are included.)
Same as in my previous scripts we import our PVSRA Data from @TradersReality open source Indicator.
With this data and the help of moving averages, we have got an edge in the market.
Signal Logic:
When a "violently green" candle appears (high buy volume + tick speed) above the 50 EMA indicates a change in trend and sudden higher prices. Depending on OHLC of the candle itself and volume, Take Profit and Stop Loss is calculated. (The price margin is the only adjustable setting). Additionally, to make this script as simple and easily useable as possible, all other adjustable variables have been already set to the best suitable value and the chart was kept plain, except for the actual entries and exits.
Basic Settings and Adjustables:
Main Input 1: TP and SL combined price range. (Double, Triple R:R equally.)
Trade Inputs: All standard trade size and contract settings for testing available.
Special Settings:
Checkbox 1: Calculate Signal in Heikin Ashi chart, including regular candle OHLC („Open, High, Low, Close“)
Checkbox 2/3: Calculate by order fill or every tick.
Checkbox 4: Possible to fill orders on bar close.
Timeframe and practical usage:
Made for the 5 Minute to 1 hour timeframe.
Literally ONLY works on Ethereum and more or less on Bitcoin.
EVERY other asset has absolute 0% profitability.
Have fun and share with your friends!
Thanks for using!
Example Chart:
Pvsra
Traders Reality Vector Candle ZonesVector Candle Zone indicator displays areas of unrecovered liquidity based on PVSRA with override option for the chart symbol.
Developed for TradersReality by infernixx with library conversion by peshocore
Traders Reality PVSRA Volume SuitePVSRA volume bars color coded to PVSRA vector candles and with override option and configurable moving average.
Indicator displays volume bars color coded to PVRSA price action and allows the user to override the chart symbol.
Developed for TradersReality by infernixx with library conversion by peshocore.
Traders Reality MainThis indicator serves as the Tradingview equivalent of an MT4 indicator suite.
It differentiates from existing TV indicators in its style and total feature set (most notably PVSRA and PVSRA Override)
It was originally designed for forex markets, and it will work for crypto as well, but it has not been tested on stocks.
List of features:
PVSRA Candles
Market boxes (NY/JP/ HK /UK/ FR and Brinks Boxes)
5/13/50/200/800 EMAs (cloud for 50EMA)
Pivot points (S/M/R 1,2,3; PP )
Yesterday and Last Week price range
Average Daily Range (Weekly and Monthly as well)
Daily Open
PVSRA Override
Psychological High/Low
Vector Candle Zones
All of these are configurable in the indicator settings.
Usage instructions:
PVSRA Candle colors meaning:
Green (bull) and red (bear): Candles with volume >= 200% of the average volume of the 10 previous chart candles, and candles where the product of candle spread x candle volume is >= the highest for the 10 previous chart time candles.
Blue (bull) and blue-violet (bear): Candles with volume >= 150% of the average volume of the 10 previous chart candles
PVSRA Override
In order to get reliable bar coloring, we need accurate data. If you're on a chart with low volume on some obscure exchange, you may want to use another exchanges datafeed for the symbol you are on to calculate the PVSRA bar colors with. This lets you do exactly that. By default it's off, but you can turn it on and use INDEX:BTCUSD, or really any other chart you want. You can combine charts too, e.g. use BINANCE:BTCUSDT+COINBASE:BTCUSD.
PVSRA Alerts
Alerts can be made for PVSRA "vector"/"climax" candles:
1. Create Alert (Clock with + sign)
2. Set Condition: "Traders Reality",
3. Select "Alert on Vector Candle",
4. Set it to Once per Bar,
5. choose your notification options.
Market boxes
The market boxes times are configurable and will change depending on the exchange timezone. I recommend to pick your main exchange/chart and adjust the times so that they are correct. Technically you will need to shift the time from the exchanges' timezone to GMT . Default values should be good for UTC based exchanges in current US+UK summer time.
Psychological High/Low
Configurable for Crypto or Forex - draws the perceived Psychological High/Low ranges for the week. Can display historical values too.
Vector Candle Zones
displays unrecovered liquidity left behind on unrecovered vectors. Configurable to take into account candle bodies or candles and wicks.
Recommended additional Tradingview indicator(s):
- TDI - Goldminds, Edited for Market Makers Method by Jakub Donovan
Footnotes
The code was originally by plasmapug, continued development (with permission) is now done by infernix and peshocore and xtech5192 in collaboration with TradersReality.
If you have suggestions or questions, you can message me or leave a comment.
Traders_Reality_LibLibrary "Traders_Reality_Lib"
This library contains common elements used in Traders Reality scripts
calcPvsra(pvsraVolume, pvsraHigh, pvsraLow, pvsraClose, pvsraOpen, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, darkGreyCandleColor, lightGrayCandleColor)
calculate the pvsra candle color and return the color as well as an alert if a vector candle has apperared.
Situation "Climax"
Bars with volume >= 200% of the average volume of the 10 previous chart TFs, or bars
where the product of candle spread x candle volume is >= the highest for the 10 previous
chart time TFs.
Default Colors: Bull bars are green and bear bars are red.
Situation "Volume Rising Above Average"
Bars with volume >= 150% of the average volume of the 10 previous chart TFs.
Default Colors: Bull bars are blue and bear are violet.
Parameters:
pvsraVolume : the instrument volume series (obtained from request.sequrity)
pvsraHigh : the instrument high series (obtained from request.sequrity)
pvsraLow : the instrument low series (obtained from request.sequrity)
pvsraClose : the instrument close series (obtained from request.sequrity)
pvsraOpen : the instrument open series (obtained from request.sequrity)
redVectorColor : red vector candle color
greenVectorColor : green vector candle color
violetVectorColor : violet/pink vector candle color
blueVectorColor : blue vector candle color
darkGreyCandleColor : regular volume candle down candle color - not a vector
lightGrayCandleColor : regular volume candle up candle color - not a vector
@return
adr(length, barsBack)
Parameters:
length : how many elements of the series to calculate on
barsBack : starting possition for the length calculation - current bar or some other value eg last bar
@return adr the adr for the specified lenght
adrHigh(adr, fromDo)
Calculate the ADR high given an ADR
Parameters:
adr : the adr
fromDo : boolean flag, if false calculate traditional adr from high low of today, if true calcualte from exchange midnight
@return adrHigh the position of the adr high in price
adrLow(adr, fromDo)
Parameters:
adr : the adr
fromDo : boolean flag, if false calculate traditional adr from high low of today, if true calcualte from exchange midnight
@return adrLow the position of the adr low in price
splitSessionString(sessXTime)
given a session in the format 0000-0100:23456 split out the hours and minutes
Parameters:
sessXTime : the session time string usually in the format 0000-0100:23456
@return
calcSessionStartEnd(sessXTime, gmt)
calculate the start and end timestamps of the session
Parameters:
sessXTime : the session time string usually in the format 0000-0100:23456
gmt : the gmt offset string usually in the format GMT+1 or GMT+2 etc
@return
drawOpenRange(sessXTime, sessXcol, showOrX, gmt)
draw open range for a session
Parameters:
sessXTime : session string in the format 0000-0100:23456
sessXcol : the color to be used for the opening range box shading
showOrX : boolean flag to toggle displaying the opening range
gmt : the gmt offset string usually in the format GMT+1 or GMT+2 etc
@return void
drawSessionHiLo(sessXTime, show_rectangleX, show_labelX, sessXcolLabel, sessXLabel, gmt, sessionLineStyle)
Parameters:
sessXTime : session string in the format 0000-0100:23456
show_rectangleX : show the session high and low lines
show_labelX : show the session label
sessXcolLabel : the color to be used for the hi/low lines and label
sessXLabel : the session label text
gmt : the gmt offset string usually in the format GMT+1 or GMT+2 etc
sessionLineStyle : the line stile for the session high low lines
@return void
calcDst()
calculate market session dst on/off flags
@return indicating if DST is on or off for a particular region
timestampPreviousDayOfWeek(previousDayOfWeek, hourOfDay, gmtOffset, oneWeekMillis)
Timestamp any of the 6 previous days in the week (such as last Wednesday at 21 hours GMT)
Parameters:
previousDayOfWeek : Monday or Satruday
hourOfDay : the hour of the day when psy calc is to start
gmtOffset : the gmt offset string usually in the format GMT+1 or GMT+2 etc
oneWeekMillis : the amount if time for a week in milliseconds
@return the timestamp of the psy level calculation start time
getdayOpen()
get the daily open - basically exchange midnight
@return the daily open value which is float price
newBar(res)
new_bar: check if we're on a new bar within the session in a given resolution
Parameters:
res : the desired resolution
@return true/false is a new bar for the session has started
toPips(val)
to_pips Convert value to pips
Parameters:
val : the value to convert to pips
@return the value in pips
rLabel(ry, rtext, rstyle, rcolor, valid, labelXOffset)
a function that draws a right aligned lable for a series during the current bar
Parameters:
ry : series float the y coordinate of the lable
rtext : the text of the label
rstyle : the style for the lable
rcolor : the color for the label
valid : a boolean flag that allows for turning on or off a lable
labelXOffset : how much to offset the label from the current position
rLabelOffset(ry, rtext, rstyle, rcolor, valid, labelXOffset)
a function that draws a right aligned lable for a series during the current bar
Parameters:
ry : series float the y coordinate of the lable
rtext : the text of the label
rstyle : the style for the lable
rcolor : the color for the label
valid : a boolean flag that allows for turning on or off a lable
labelXOffset : how much to offset the label from the current position
rLabelLastBar(ry, rtext, rstyle, rcolor, valid, labelXOffset)
a function that draws a right aligned lable for a series only on the last bar
Parameters:
ry : series float the y coordinate of the lable
rtext : the text of the label
rstyle : the style for the lable
rcolor : the color for the label
valid : a boolean flag that allows for turning on or off a lable
labelXOffset : how much to offset the label from the current position
drawLine(xSeries, res, tag, xColor, xStyle, xWidth, xExtend, isLabelValid, labelXOffset, validTimeFrame)
a function that draws a line and a label for a series
Parameters:
xSeries : series float the y coordinate of the line/label
res : the desired resolution controlling when a new line will start
tag : the text for the lable
xColor : the color for the label
xStyle : the style for the line
xWidth : the width of the line
xExtend : extend the line
isLabelValid : a boolean flag that allows for turning on or off a label
labelXOffset : how much to offset the label from the current position
validTimeFrame : a boolean flag that allows for turning on or off a line drawn
drawLineDO(xSeries, res, tag, xColor, xStyle, xWidth, xExtend, isLabelValid, labelXOffset, validTimeFrame)
a function that draws a line and a label for the daily open series
Parameters:
xSeries : series float the y coordinate of the line/label
res : the desired resolution controlling when a new line will start
tag : the text for the lable
xColor : the color for the label
xStyle : the style for the line
xWidth : the width of the line
xExtend : extend the line
isLabelValid : a boolean flag that allows for turning on or off a label
labelXOffset : how much to offset the label from the current position
validTimeFrame : a boolean flag that allows for turning on or off a line drawn
drawPivot(pivotLevel, res, tag, pivotColor, pivotLabelColor, pivotStyle, pivotWidth, pivotExtend, isLabelValid, validTimeFrame, levelStart, pivotLabelXOffset)
draw a pivot line - the line starts one day into the past
Parameters:
pivotLevel : series of the pivot point
res : the desired resolution
tag : the text to appear
pivotColor : the color of the line
pivotLabelColor : the color of the label
pivotStyle : the line style
pivotWidth : the line width
pivotExtend : extend the line
isLabelValid : boolean param allows to turn label on and off
validTimeFrame : only draw the line and label at a valid timeframe
levelStart : basically when to start drawing the levels
pivotLabelXOffset : how much to offset the label from its current postion
@return the pivot line series
getPvsraFlagByColor(pvsraColor, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, lightGrayCandleColor)
convert the pvsra color to an internal code
Parameters:
pvsraColor : the calculated pvsra color
redVectorColor : the user defined red vector color
greenVectorColor : the user defined green vector color
violetVectorColor : the user defined violet vector color
blueVectorColor : the user defined blue vector color
lightGrayCandleColor : the user defined regular up candle color
@return pvsra internal code
updateZones(pvsra, direction, boxArr, maxlevels, pvsraHigh, pvsraLow, pvsraOpen, pvsraClose, transperancy, zoneupdatetype, zonecolor, zonetype, borderwidth, coloroverride, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, lightGrayCandleColor)
a function that draws the unrecovered vector candle zones
Parameters:
pvsra : internal code
direction : above or below the current pa
boxArr : the array containing the boxes that need to be updated
maxlevels : the maximum number of boxes to draw
pvsraHigh : the pvsra high value series
pvsraLow : the pvsra low value series
pvsraOpen : the pvsra open value series
pvsraClose : the pvsra close value series
transperancy : the transparencfy of the vecor candle zones
zoneupdatetype : the zone update type
zonecolor : the zone color if overriden
zonetype : the zone type
borderwidth : the width of the border
coloroverride : if the color overriden
redVectorColor : the user defined red vector color
greenVectorColor : the user defined green vector color
violetVectorColor : the user defined violet vector color
blueVectorColor : the user defined blue vector color
lightGrayCandleColor : the user defined regular up candle color
cleanarr(arr)
clean an array from na values
Parameters:
arr : the array to clean
@return if the array was cleaned
calcPsyLevels(oneWeekMillis, showPsylevels, psyType, sydDST)
calculate the psy levels
4 hour res based on how mt4 does it
mt4 code
int Li_4 = iBarShift(NULL, PERIOD_H4, iTime(NULL, PERIOD_W1, Li_0)) - 2 - Offset;
ObjectCreate("PsychHi", OBJ_TREND, 0, Time , iHigh(NULL, PERIOD_H4, iHighest(NULL, PERIOD_H4, MODE_HIGH, 2, Li_4)), iTime(NULL, PERIOD_W1, 0), iHigh(NULL, PERIOD_H4,
iHighest(NULL, PERIOD_H4, MODE_HIGH, 2, Li_4)));
so basically because the session is 8 hours and we are looking at a 4 hour resolution we only need to take the highest high an lowest low of 2 bars
we use the gmt offset to adjust the 0000-0800 session to Sydney open which is at 2100 during dst and at 2200 otherwize. (dst - spring foward, fall back)
keep in mind sydney is in the souther hemisphere so dst is oposite of when london and new york go into dst
Parameters:
oneWeekMillis : a constant value
showPsylevels : should psy levels be calculated
psyType : the type of Psylevels - crypto or forex
sydDST : is Sydney in DST
@return
Unrecovered Imbalanced Zone with PVRSAThis indicator highlights imbalanced PVSRA candles that have not been recovered.
Bullish Candles/Zones
200% Volume = Green
150% Volume = Blue
Bearish Candles/Zones
200% Volume = Red
150% Volume = Fuchsia
Imbalanced Zones with normal/below 150% Average 10ema volume can be displayed or hidden from view (Hidden by default)
PVSRA StudyThis script will show you the percentage change in volume and also consider stopping volume that is genuine reversal volume.
Market Maker BalanceWhere is the market maker in his cycle of building longs or shorts? When is that big drop or big pump coming?
This is a simple and unexpectedly powerful indicator that shows you an estimate of the market maker's position over the last 200 candles. It works on any timeframe.
How does it work?
It combines a simple 10-candle Price Volume Support Resistance Analysis metric of climactic and rising volume. That volume is combined to create a bullish and bearish balance over a period of 200 candles. The curves are smoothed out with a 10 period EMA.
The MMB (Marker Maker Balance) oscillator is the resulting bearish volume - bullish volume, which shows us THEIR position balance.
Indications:
when shorts are increasing (further below 0), we are in a bullish trend -- you should be taking profit on longs
when shorts are flat or decreasing, the trend is due for a reversal -- you should be closing longs and looking to short
when shorts cross 0 to long, the trend is reversing down -- you should be in a short position by now
when longs are increasing, we are in a bearish trend -- you should be taking profits on your shorts
when longs are flat or decreasing, the trend is due for a reversal -- you should be closing your shorts
For extra information, there are also the separate lines for rising and climactic volume to give you early indications of reversal or change in Market Maker behaviour. You can disable them in the Style settings, but they can be a useful early indicator that the current trend is losing strength when rising volume overtakes climax volume (MM's no longer moving out of zones higher/lower).
Ways to use this indicator are quite simple and eerily accurate:
for short term gains, do the opposite of MMs: long when MM are opening more shorts, short when they are opening more longs
for huge positions, mimic the MM position: build long positions / close shorts when MMB is rising, build shorts / close longs when MMB is falling or crosses above 0 (be careful with leverage, begin on 1x leverage)
Note: the results of this indicator will be different for each exchange, because of their different trading volumes per candle. It's advisable to use it for the exchange you're trading on or use a chart that averages all exchanges for that asset, like INDEX:BTCUSD.
For those of you who use the Backtesting & Trading Engine by PineCoders, the BTE Signal plot generates long and short entries as well as filter states. Use this plot as the source for BTE.
Shout out to @infernixx for PVSRA calculations in his awesome Traders Reality indicator, the code of which I shamelessly ripped off and edited for this indicator.
Leave comments below if you want something added.