ttip_channel = 'Asian Session Opening Channel is the range between Tokyo Open and Hong Kong Open\n' + 'Europien Session Opening Channel is the range between Frankfurt Open and London Open\n\n' + 'Channel plotting starts from Tokyo or Frankfurt open, based on the option selected, and extends till the day session end'
ttip_events = 'A graphical presentation* of typically traded volume** and various forext markets oppening/clossing events***\n\n' + '* Will be presented on 1H or lower minute timeframes\n' + '** According to the two most popular currencies traded, U.S. dollar (USD) and the Euro (EUR). Trading volume may slightly vary for other currencies, especially Asian currencies\n' + '*** Reminder, Daylight saving time is not taken into consideration so there may be slight differences'
ttip_vwap = 'Volume Weighted Average Price (VWAP) is a technical analysis tool used to measure the average price weighted by volume. VWAP is typically used with intraday charts as a way to determine the general direction of intraday prices, that is to identify market trend' ttip_vwapAnchor = 'Auto input mode : the starting point of the VWAP calculation depends on the timeframe on the chart:\n' + ' - "Day" on intraday timeframes up to 15 Mins\n' + ' - "Week" on intraday timeframes higher than 15 Mins\n' + ' - "Month" on the 1D timeframe\n' + ' - "Quarter" on the 1W timeframe\n' + ' - "Year" on the 1M timeframe\n\n' + 'Interactive input mode : enables selecting the starting point of the VWAP calculation by simply dragging the vertical line* on the chart\n *the vertical line appears when any of the indicators plotted components are clicked\n\n' + 'Manuel input mode (other options) : enables to specify a fixed anchor period regardless of the chart timeframe'
tooltip_pvt = 'The Pivot Points High Low indicator is used to determine and anticipate potential changes in market price and reversals. By analyzing price changes and reversals, a trader has more of an ability to determine and predict price patterns and general price trends\n\n' + 'This custom interpretation of Pivot Points High Low indicator; \n' + ' - beside calculating Pivot Highs/Lows based on the given length it also calculates and detects short term Pivot Highs/Lows\n' + ' - calculates price changes, traded volume etc between any two Pivot High/Low'
if _marketDetails if A != 1 and A != 7 fxO = array.get(a_forexOpenH , array.indexof(a_forexMarket, _utc)) fxC = array.get(a_forexCloseH, array.indexof(a_forexMarket, _utc))
market = if h >= fxO and h < fxC hc = fxC - h - 1 mc = 60 - m - 1 sc = 60 - s sct = sc < 10 ? '0' + str.tostring(sc) : str.tostring(sc) mct = mc < 10 ? '0' + str.tostring(mc) : str.tostring(mc) hct = hc < 10 ? '0' + str.tostring(hc) : str.tostring(hc) closes = hct + ':' + mct + ':' + sct
if hc == 0 sc % 2 ? dateTime + ' 🟢 Closes in ' + closes : dateTime + ' 🔴 Closes in ' + closes else dateTime + ' 🟢 Closes in ' + closes else ho = if h < fxO fxO - h - 1 else 24 - h + fxO - 1 mo = 60 - m - 1 so = 60 - s sot = so < 10 ? '0' + str.tostring(so) : str.tostring(so) mot = mo < 10 ? '0' + str.tostring(mo) : str.tostring(mo) hot = ho < 10 ? '0' + str.tostring(ho) : str.tostring(ho) opens = hot + ':' + mot + ':' + sot
if h >= fxC and A == 6 dateTime + ' 🟠 Weekend' else if ho == 0 so % 2 ? dateTime + ' 🔴 Opens in ' + opens : dateTime + ' 🟢 Opens in ' + opens else dateTime + ' 🔴 Opens in ' + opens market else dateTime + ' 🟠 Weekend' else dateTime
if dayChange and tfMultiplier <= 60 and forex_n_cdf and forexEvents and timeframe.isintraday if array.size(a_lines) > 0 for i = 1 to array.size(a_lines) line.delete(array.shift(a_lines))
if array.size(a_labels) > 0 for i = 1 to array.size(a_labels) label.delete(array.shift(a_labels))
if array.size(a_fill) > 0 for i = 1 to array.size(a_fill) linefill.delete(array.shift(a_fill))
array.push(a_labels, label.new(bar_index + barIndex * 60 / tfMultiplier, priceLowest * (1 - (oscHighest - array.get(a_tradingVolume, barIndex)) * hight / oscHighest), '', xloc.bar_index, yloc.price, #00000000, label.style_circle, #00000000, size.tiny, text.align_left, 'At this time of day\n - Trading volume is typically ' + array.get(a_forexEvents, barIndex) ) ) array.push(a_labels, label.new(bar_index + barIndex * 60 / tfMultiplier, priceLowest * (1 - (oscHighest - array.get(a_tradingVolume, barIndex)) * hight / oscHighest), '', xloc.bar_index, yloc.price, color.from_gradient(array.get(a_tradingVolume, barIndex), 1, 6, #ef5350, #26a69a), label.style_circle, #00000000, size.auto, text.align_left, '') )//'At this time of day\n - Trading volume is typically ' + array.get(a_forexEvents, barIndex) ) ) array.push(a_labels, label.new(bar_index + 24 * 60 / tfMultiplier, priceLowest * (1 - (oscHighest - array.get(a_tradingVolume, 0)) * hight / oscHighest), '', xloc.bar_index, yloc.price, #00000000, label.style_circle, #00000000, size.tiny, text.align_left, 'At this time of day\n - Trading volume is typically ' + array.get(a_forexEvents, 0) ) ) array.push(a_labels, label.new(bar_index + 24 * 60 / tfMultiplier, priceLowest * (1 - (oscHighest - array.get(a_tradingVolume, 0)) * hight / oscHighest), '', xloc.bar_index, yloc.price, color.from_gradient(array.get(a_tradingVolume, 0), 1, 6, #ef5350, #26a69a), label.style_circle, #00000000, size.auto, text.align_left, '') )//'At this time of day\n - Trading volume is typically ' + array.get(a_forexEvents, 0) ) )
label.delete(events[1]) blabla := 0 events := label.new(bar_index, priceLowest * (1 - hight), '', xloc.bar_index, yloc.price, color.new(color.from_gradient(array.get(a_tradingVolume, blabla), 1, 6, #ef5350, #26a69a), 75), label.style_label_up, color.white, size.tiny, text.align_left, 'At this time of day\n - Trading volume is typically ' + array.get(a_forexEvents, blabla) )
if ta.change(priceLowest) < 0 and not dayChange and tfMultiplier <= 60 and forex_n_cdf and forexEvents and timeframe.isintraday for barIndex = 0 to array.size(a_lines) - 1 line.set_y1(array.get(a_lines , barIndex), line.get_y1(array.get(a_lines , barIndex)) - priceLowest[1] + priceLowest) line.set_y2(array.get(a_lines , barIndex), line.get_y2(array.get(a_lines , barIndex)) - priceLowest[1] + priceLowest) for barIndex = 0 to array.size(a_labels) - 1 label.set_y(array.get(a_labels, barIndex), label.get_y(array.get(a_labels, barIndex)) - priceLowest[1] + priceLowest) label.set_y(events, label.get_y(events) - priceLowest[1] + priceLowest)
if ta.change(time('60')) and not dayChange and tfMultiplier <= 60 and forex_n_cdf and forexEvents and timeframe.isintraday blabla += 1 label.set_tooltip(events, 'At this time of day\n - Trading volume is typically ' + array.get(a_forexEvents, blabla) ) label.set_color(events, color.from_gradient(array.get(a_tradingVolume, blabla), 1, 6, #ef5350, #26a69a)) label.set_x(events, bar_index) else if forex_n_cdf and tfMultiplier <= 60 and forexEvents and timeframe.isintraday label.set_x(events, bar_index)
// ---------------------------------------------------------------------------------------------- // // Process Forex Markets ------------------------------------------------------------------------ //
if A != 1 and A != 7 fxO = array.get(a_forexOpenH , array.indexof(a_forexMarket, _utc)) fxC = array.get(a_forexCloseH, array.indexof(a_forexMarket, _utc))
if h >= fxO and h < fxC true else false else false
if array.size(aH) > 0 if _numberOfDataRequired >= tfMultiplier orH := array.max(aH) orL := array.min(aL)
else if _numberOfDataRequired < tfMultiplier if array.size(aH) >= _numberOfDataRequired orH := array.get(aH, 0) orL := array.get(aL, 0)
for c = 1 to _numberOfDataRequired - 1 orH := math.max(array.get(aH, c), orH) orL := math.min(array.get(aL, c), orL) else orH := array.max(aH) orL := array.min(aL) [orH, orL]
f_processForex(_show, _utc, _dst, _color, _bg) => if _show != 'None' var pro = 0., var prh = 0., var prl = 0. var sessionStartBar = 0 var line lnh = na, var line lnl = na var count = 0