orangequant1

FRANKENSTEIN code

orangequant1 Mis à jour   
OANDA:EURUSD   Euro / Dollar Américain
"Frankenstein" is the code I often call "Frank". It's below. At first glance, you'll think it's just a way to show a different timeframe and with candles. Wrong. Its candles are dynamic with the chart's tf. For example, a 4-hr tf starts at 5pm ET, ends at 9pm ET. But, say, the 7pm ET Frank candle (running a 4-hr lookback) does not show the standard 5pm ET tf-- rather it shows a lookback to 3pm ET. Tricky. IMPORTANT: If resetting lookback, you must reset all 3 of them, and note that the first one is one less than the second and third. I'm still learning to read Frank. I kind of think I should read ONLY Frank's current candle and not relate it to the preceding candle at all but I could be wrong. I simply look at current Frank candle and determine its type (still figuring out whether its color is that significant). Good luck with Frank!
//@version=4
//works
study("frankenstein",overlay=false)
theopen = open
theclose = close
thehigh = highest(high,9)
thelow = lowest(low,9)

lime = color.lime
red = color.red
palette = theclose >= theopen ? color.lime : color.red
plotcandle(theopen, thehigh, thelow, theclose,color = palette)
Commentaire:
TV keeps dropping my brackets from the post. So I use parens here instead, and say "theopen=(8)" but the parens should be brackets.
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.