Nicolas

Forex Dashboard: currency strength dials, mini charts and a heat map of the 28 pairs in one panel

Studio Only
Category: Indicators By: Nicolas Created: December 4, 2026, 5:10 PM
December 4, 2026, 5:10 PM
Indicators
0 Comments
ProRealCode Script
Forex Dashboard: currency strength dials, mini charts and a heat map of the 28 pairs in one panel

Forex Dashboard measures the eight major currencies, EUR, GBP, AUD, NZD, USD, CAD, CHF and JPY, against each other and shows the result in one panel under the chart. A table ranks them from the strongest to the weakest, with a dial for the strength of each currency, a mini chart for its path, a bar for its recent move and a regime word that says whether it is still gaining or losing ground. Beside the table, a heat map gives the move of each of the 28 pairs the eight currencies make. Behind both, the panel draws the eight strength curves over the session. It answers the question a forex trader asks before choosing a pair: which currency is actually moving, and against which one is the gap the widest. It works on any chart and any intraday timeframe, whatever the instrument of the chart.

This code is written in ProRealCode Script and runs with ProRealCode Studio on ProRealTime Web.

Forex Dashboard panel under a 1-minute AUD/CAD chart: a table ranking the eight major currencies with dials, mini charts, bars and regimes, a heat map of the 28 pairs, and the eight strength curves behind it

Spot AUD/CAD, 1 minute, light theme. The price is the thin strip at the top, the dashboard fills its own panel underneath. Measured since the start of the day, CAD is the strongest currency at +0.4 % and AUD the weakest at -0.55 %, so the widest gap is AUD/CAD, down 0.94 %; the chart’s own quote reads -0.93 % for the day. CAD reads “weakening”: it is still well up on the day, but its bar over the last 12 candles is red. CHF, JPY, GBP and EUR are leading, USD, NZD and AUD are lagging. In the heat map, the CAD row is green from +0.26 to +0.94 and the AUD row red from -0.94 to -0.33. Behind the table, the eight curves from 08:20 to 16:00: CAD jumps to the top around 14:30 while USD drops at the same moment, JPY, CHF, EUR and GBP end in a group around +0.1, USD and NZD between -0.1 and -0.2, and AUD stays alone at the bottom near -0.55.

How the strength of a currency is measured

The code reads seven pairs with MarketData, on the timeframe of the chart: EURUSD, GBPUSD, AUDUSD, NZDUSD, USDCAD, USDCHF and USDJPY. Every major pair has the dollar on one side, so these seven are enough to price the eight currencies against each other. The instrument of the chart itself does not enter the calculation.

From there, the measure takes three steps:

  • Each currency is priced in dollars. EUR, GBP, AUD and NZD are read directly from their pair, CAD, CHF and JPY are the inverse of theirs, and the dollar is worth one dollar. The code works on the logarithm of each price, so that moves add up and the move of a pair is exactly the opposite of the move of its inverse.
  • The basket is the average of the eight. Each currency is compared with that average: its index is its own logarithm minus the average. This removes the dollar from the picture. What is left is how the currency moves against the seven others taken together.
  • The strength is the move of that index since the start of the window, multiplied by 100. These are logarithmic moves, and for moves of this size they read as percent: +0.4 means the currency gained about 0.4 % against the basket.

Two properties follow from this construction, and they are what make the dashboard consistent:

  • The eight strengths always add up to zero. One currency can only rise against the basket if others fall. On the first capture, the eight dials add up to +0.01, which is the rounding of the figures.
  • The difference between two strengths is the move of their pair. CAD at +0.4 % and AUD at -0.55 % make a gap of about 0.95, and AUD/CAD is indeed down 0.94 % over the same window. The small difference is rounding again. This is why the heat map can give all 28 pairs from seven prices.

The window

The first setting decides from when the moves are counted:

  • Today, the default: every currency starts again from zero at the close of the previous day.
  • This week: from the close before the first day of the week.
  • This month: from the close before the first day of the month.
  • Rolling window: the move over a fixed number of candles, 96 by default. Nothing restarts, the window slides with each new candle.

With Today, This week and This month, a dotted vertical line marks each start of a new period in the panel, where the eight curves go back to zero together.

The table

The table has one column per currency, in the order of the ranking: the strongest on the left, the weakest on the right. Each row reads the same way for the eight currencies:

  • Currency: the name, in the colour of its curve and of its tag in the panel.
  • Strength, %: a dial and the value under it. The needle is upright at zero, it leans to the right for a currency that gained and to the left for one that lost. The dials are all scaled on the largest of the eight strengths, so they compare with each other: the currency with the largest move reaches the end of its dial, the others lean in proportion, and a currency close to zero stays near the top. The arc goes from red for a loss through grey to green for a gain.
  • Path: a mini chart of the currency against the basket over the last 60 candles, without the restart of the day. Each mini chart is scaled to its own range, so it shows the shape of the move, not its size: a currency that barely moved still fills its cell. On a quiet hour, a mini chart is mostly noise; it becomes useful when one currency climbs or falls steadily while the others wander.
  • Last 12 candles: a bar for the move of the currency over the last 12 candles only. Its length is the size of the move, its colour the direction, green for a gain and red for a loss. The bars are scaled on the largest of the eight recent moves.
  • Regime: the strength and the recent move together, in one word. leading in green: up over the window and still gaining. weakening in amber: up over the window, but losing ground over the last candles. improving in blue: down over the window, but gaining over the last candles. lagging in red: down over the window and still losing.
  • The summary line, at the bottom: the widest gap, the strongest currency against the weakest. The pair is named the way it is quoted, AUDCAD and not CADAUD, with “up” or “down” for its direction, then the strengths of the two currencies.

The title of the table recalls the window in use: “Today”, “This week”, “This month” or “last 96 candles”. The table is a neutral grey card with its own text colours, so it reads the same on a dark and on a light chart.

Forex Dashboard table on a dark chart: CAD strongest at +0.38 %, AUD weakest at -0.6 %, a dial, a mini chart, a recent move bar and a regime for each currency, and the heat map of the 28 pairs

The table alone on a dark chart, a little later the same day. CAD is still the strongest at +0.38 %, then CHF and JPY at +0.16 %, GBP +0.14 %, EUR +0.09 %, USD -0.11 %, NZD -0.22 % and AUD -0.6 %. CAD’s dial leans far to the right, AUD’s far to the left, EUR’s stays nearly upright. CAD, CHF, JPY and GBP are now all leading, EUR has turned to weakening with a short red bar, and USD, NZD and AUD are lagging, USD with the longest red bar of the eight. CAD’s mini chart climbs at its right end while USD’s drops. The widest gap has grown: AUDCAD down 0.98 %.

The heat map of the 28 pairs

The heat map sits to the right of the table. A cell is the move of the pair made of the currency of its row against the currency of its column, in percent over the same window: the CAD row and the AUD column give the move of CAD against AUD. Green is a gain for the row currency, red a loss, and the colour is scaled on the widest gap, so the strongest pair is the most saturated cell.

Rows and columns follow the ranking of the table. The top-right corner, the strongest currency against the weakest, is therefore the greenest cell, and the bottom-left corner, the same pair the other way round, the reddest. The two halves on either side of the diagonal mirror each other: the cell of CAD against AUD reads +0.94 and the cell of AUD against CAD -0.94. A row that is green across the board is a currency that gained against every other one, which is a broad move rather than a move against one currency only.

The curves

Behind the table, the panel draws the eight strengths over time, one colour per currency, the same colour as the name in the table. A tag with the name of the currency sits at the right end of each curve, and one tag in two is pushed a little further right so that two curves close together keep readable tags. The zero line is dotted.

The table sits at the top left of the panel, so the latest candles and the tags stay visible on the right. The curves show what the table cannot: when a move happened, and whether the currencies moved one at a time or all together. On the first capture, the jump of CAD and the drop of USD around 14:30 happen at the same moment.

Settings and how to use it

Paste the code into a new Studio tab and run it. It opens in its own panel under the price and works on any chart, since the chart’s own instrument does not enter the calculation; the pairs are read on the chart’s timeframe. The settings come in three sections, Measure, Dashboard and Curves, and each one has a help text in the Settings form:

  • Measure the moves over: Today by default, or This week, This month and Rolling window. The window of the strengths, as described above.
  • Rolling window (candles): 96 by default, 2 at least. Only used with Rolling window. 96 candles of 15 minutes make one day.
  • Recent move (candles): 12 by default, 1 at least. The length of the recent move, behind the bars and the regimes. A shorter value makes the regimes react faster and change more often.
  • Dashboard table: a switch, on by default. Off, only the curves are drawn.
  • Heat map of the 28 pairs: a switch, on by default.
  • Colours of the heat map: Vivid by default, a bright red and green. Soft uses the darker built-in colour ramp of the heat map cells instead.
  • Candles in the mini charts: 60 by default, 10 at least, 200 at most.
  • Strength curves: a switch, on by default. Off, the curves and their tags are hidden, the dotted zero line stays.
  • Currency tags at the end of the curves: a switch, on by default.

Settings form of the Forex Dashboard with nine settings in three sections, Measure, Dashboard and Curves, all at their default values

The Settings form: nine settings in three sections, Measure, Dashboard and Curves, all at their defaults.

Things to know before reading the panel:

  • Give the panel room. Enlarge it to about 240 pixels high, or the bottom of the table is cut. With the heat map, the table is about 920 pixels wide: on a narrow chart, turn the heat map or the curves off.
  • The seven pairs load first. Until they have all arrived, a small card reads “Forex dashboard · loading the pairs · n of 7”, and nothing else is drawn.
  • A rolling window needs history. When it is longer than the loaded candles, a card reads “Forex dashboard · not enough history for this window”. Shorten the window or load more history.
  • When the forex market is closed, the last values are carried forward.
  • The timeframe changes the reading of the table. The bars and the mini charts count candles, so 12 candles are 12 minutes on a 1-minute chart and three hours on a 15-minute chart. The strengths themselves, measured since the start of the day, week or month, do not depend on the timeframe.

A typical reading: to trade a currency, pick its pair with a currency that goes the other way. A leading currency against a lagging one, far apart in the table, is a pair with a clear gap, and the heat map gives its move at a glance. Two currencies next to each other in the ranking, both leading or both lagging, move together, and their pair has little to offer. The regimes say how fresh the gap is: when the leader turns to “weakening” or the laggard to “improving”, the gap is closing, and the move of their pair may be running out. The curves say whether the gap came from one sudden jump or from a steady climb over the session. Each of these is a reason. None of them is a signal on its own.

Under the hood

The code reads seven other instruments with MarketData, on the chart’s timeframe. It builds its table with DRAWTABLE, TABLEMERGE for the cells that span several rows or columns, TABLECELL for the text, and the four widget cells of ProRealCode Script: TABLEGAUGE for the dials, TABLESPARK for the mini charts, TABLEBAR for the recent moves and TABLEHEAT for the Soft colours of the heat map. The Vivid colours are set with TABLEBG and GRADIENTCOLOR, which also colours the arc of each dial from red through grey to green. Arrays and loops rank the currencies and place each of them in its column, a FUNCTION with several return values gives each currency its colour, and the text of the cells is joined with +. The settings are input() declarations grouped in sections with their help texts, the tags at the end of the curves are DRAWLABEL, and DEFPARAM overlay = false gives the code a panel of its own.

//----------------------------------------------------------------
// PRC_Forex Dashboard | indicator
// Author: Nicolas
// Date: 04.12.2026
// https://www.prorealcode.com
// License: CC BY-NC 4.0 - free to use, share and modify for
// non-commercial purposes, provided the author and the source
// above are credited.
// https://creativecommons.org/licenses/by-nc/4.0/
//----------------------------------------------------------------
// The eight major currencies against each other, in one panel under
// the chart. Seven pairs are read with MarketData, and each currency
// is measured against the basket of the eight. The table ranks them
// from the strongest to the weakest: a dial for the strength, a mini
// chart for its path, a bar for the recent move and a regime. Beside
// it, a heat map gives the move of each of the 28 pairs. Behind the
// table, the panel draws the eight strength curves.
// Runs with ProRealCode Studio: https://www.prorealcode.com/prorealcode-studio/
//----------------------------------------------------------------

DEFPARAM overlay = false

input(measure, "Today", "Measure the moves over", string, options = ["Today", "This week", "This month", "Rolling window"], group = "Measure", tooltip = "Today, This week and This month count the move of each currency from the start of the day, the week or the month. Rolling window counts it over a fixed number of candles.")
input(rollLen, 96, "Rolling window (candles)", int, minval = 2, group = "Measure", tooltip = "Only used when the choice above is Rolling window. 96 candles of 15 minutes make one day.")
input(momLen, 12, "Recent move (candles)", int, minval = 1, group = "Measure", tooltip = "The move of each currency over the last candles: the length of its bar in the table, green for a gain and red for a loss. It also decides the regime.")
input(showTable, 1, "Dashboard table", bool, group = "Dashboard", tooltip = "The table of the eight currencies, at the top left of the panel.")
input(showMatrix, 1, "Heat map of the 28 pairs", bool, group = "Dashboard", tooltip = "Adds the pair matrix to the right of the table. Turn it off on a narrow chart.")
input(heat, "Vivid", "Colours of the heat map", string, options = ["Vivid", "Soft"], group = "Dashboard", tooltip = "Vivid: bright red and green. Soft: the darker built-in ramp.")
input(sparkLen, 60, "Candles in the mini charts", int, minval = 10, group = "Dashboard", tooltip = "The number of candles each mini chart of the table draws, up to 200.")
input(showCurves, 1, "Strength curves", bool, group = "Curves", tooltip = "The eight strength curves in the panel, one colour per currency.")
input(showTags, 1, "Currency tags at the end of the curves", bool, group = "Curves", tooltip = "A tag with the name of the currency at the right end of each curve.")

// The first known value: the candle before when there is one
FUNCTION firstOr(prev, cur)
    IF ISSET(prev) THEN
        RETURN prev
    ENDIF
    RETURN cur
ENDFUNCTION

// One colour per currency, the same for its curve, its tag and its name
FUNCTION tint(i)
    IF i = 0 THEN
        RETURN 70, 140, 255
    ELSIF i = 1 THEN
        RETURN 175, 110, 255
    ELSIF i = 2 THEN
        RETURN 0, 200, 215
    ELSIF i = 3 THEN
        RETURN 165, 205, 60
    ELSIF i = 4 THEN
        RETURN 240, 195, 50
    ELSIF i = 5 THEN
        RETURN 240, 100, 180
    ELSIF i = 6 THEN
        RETURN 250, 140, 50
    ENDIF
    RETURN 175, 182, 196
ENDFUNCTION

// -- 1. The seven pairs, on the chart's timeframe ---------------------
// Every major pair has the dollar on one side, so seven pairs are
// enough to compare the eight currencies. Until a pair has arrived it
// reads undefined, and nothing is drawn.
eurusd = MarketData("EURUSD", default, close, default)
gbpusd = MarketData("GBPUSD", default, close, default)
audusd = MarketData("AUDUSD", default, close, default)
nzdusd = MarketData("NZDUSD", default, close, default)
usdcad = MarketData("USDCAD", default, close, default)
usdchf = MarketData("USDCHF", default, close, default)
usdjpy = MarketData("USDJPY", default, close, default)

// -- 2. Each currency against the basket of the eight -----------------
// The logarithm of the price of each currency in dollars (0 for the
// dollar itself), minus the average of the eight. The difference of
// that index between two candles is the move of the currency against
// the seven others, and the difference between two currencies is the
// move of their pair.
lEUR = LOG(eurusd)
lGBP = LOG(gbpusd)
lAUD = LOG(audusd)
lNZD = LOG(nzdusd)
lCAD = 0 - LOG(usdcad)
lCHF = 0 - LOG(usdchf)
lJPY = 0 - LOG(usdjpy)
basket = (lEUR + lGBP + lAUD + lNZD + lCAD + lCHF + lJPY) / 8
xEUR = lEUR - basket
xGBP = lGBP - basket
xAUD = lAUD - basket
xNZD = lNZD - basket
xUSD = 0 - basket
xCAD = lCAD - basket
xCHF = lCHF - basket
xJPY = lJPY - basket

// -- 3. The start of the measure --------------------------------------
rolling = 0
IF measure = "Rolling window" THEN
    rolling = 1
ENDIF
newPeriod = 0
IF barindex > 0 THEN
    IF measure = "This week" THEN
        newPeriod = DayOfWeek < DayOfWeek[1]
    ELSIF measure = "This month" THEN
        newPeriod = Month <> Month[1]
    ELSE
        newPeriod = Date <> Date[1]
    ENDIF
ENDIF

once started = 0
IF rolling THEN
    bEUR = xEUR[rollLen]
    bGBP = xGBP[rollLen]
    bAUD = xAUD[rollLen]
    bNZD = xNZD[rollLen]
    bUSD = xUSD[rollLen]
    bCAD = xCAD[rollLen]
    bCHF = xCHF[rollLen]
    bJPY = xJPY[rollLen]
ELSIF ISSET(xEUR) AND (started = 0 OR newPeriod) THEN
    // Every currency starts again from the last close of the period before
    bEUR = firstOr(xEUR[1], xEUR)
    bGBP = firstOr(xGBP[1], xGBP)
    bAUD = firstOr(xAUD[1], xAUD)
    bNZD = firstOr(xNZD[1], xNZD)
    bUSD = firstOr(xUSD[1], xUSD)
    bCAD = firstOr(xCAD[1], xCAD)
    bCHF = firstOr(xCHF[1], xCHF)
    bJPY = firstOr(xJPY[1], xJPY)
    IF started AND showCurves THEN
        DRAWVLINE(barindex) COLOURED(120, 128, 142, 90) STYLE(dottedline, 1)
    ENDIF
    started = 1
ENDIF

// The strength of each currency, in percent, since the start
sEUR = (xEUR - bEUR) * 100
sGBP = (xGBP - bGBP) * 100
sAUD = (xAUD - bAUD) * 100
sNZD = (xNZD - bNZD) * 100
sUSD = (xUSD - bUSD) * 100
sCAD = (xCAD - bCAD) * 100
sCHF = (xCHF - bCHF) * 100
sJPY = (xJPY - bJPY) * 100

IF islastbarupdate THEN
    nLoaded = ISSET(eurusd) + ISSET(gbpusd) + ISSET(audusd) + ISSET(nzdusd) + ISSET(usdcad) + ISSET(usdchf) + ISSET(usdjpy)
    IF nLoaded < 7 THEN
        // -- The pairs have not all arrived yet -----------------------
        IF showTable THEN
            wait = DRAWTABLE(1, 1, topleft) FILLCOLOR(42, 45, 52, 245) BORDERCOLOR(84, 90, 102)
            TABLECELL(wait, 0, 0, "Forex dashboard · loading the pairs · #nLoaded# of 7", bold, center, 13) COLOURED(250, 195, 80)
        ENDIF
    ELSIF ISSET(sEUR) = 0 THEN
        IF showTable THEN
            short = DRAWTABLE(1, 1, topleft) FILLCOLOR(42, 45, 52, 245) BORDERCOLOR(84, 90, 102)
            TABLECELL(short, 0, 0, "Forex dashboard · not enough history for this window", bold, center, 13) COLOURED(250, 195, 80)
        ENDIF
    ELSE
        // -- 4. The eight currencies, ranked --------------------------
        // The order of the list is the order pairs are named in: the
        // first of two currencies is the base of their pair.
        $cd[0] = "EUR"
        $cd[1] = "GBP"
        $cd[2] = "AUD"
        $cd[3] = "NZD"
        $cd[4] = "USD"
        $cd[5] = "CAD"
        $cd[6] = "CHF"
        $cd[7] = "JPY"
        $s[0] = sEUR
        $s[1] = sGBP
        $s[2] = sAUD
        $s[3] = sNZD
        $s[4] = sUSD
        $s[5] = sCAD
        $s[6] = sCHF
        $s[7] = sJPY
        // The recent move: the same measure over the last candles only
        $m[0] = (xEUR - xEUR[momLen]) * 100
        $m[1] = (xGBP - xGBP[momLen]) * 100
        $m[2] = (xAUD - xAUD[momLen]) * 100
        $m[3] = (xNZD - xNZD[momLen]) * 100
        $m[4] = (xUSD - xUSD[momLen]) * 100
        $m[5] = (xCAD - xCAD[momLen]) * 100
        $m[6] = (xCHF - xCHF[momLen]) * 100
        $m[7] = (xJPY - xJPY[momLen]) * 100
        // $rk: the rank of a currency, 0 for the strongest. $at: the
        // currency at a rank.
        top = 0.05
        mTop = 0.02
        FOR i = 0 TO 7 DO
            r = 0
            FOR j = 0 TO 7 DO
                IF $s[j] > $s[i] OR ($s[j] = $s[i] AND j < i) THEN
                    r = r + 1
                ENDIF
            NEXT
            $rk[i] = r
            $at[r] = i
            top = MAX(top, ABS($s[i]))
            IF ISSET($m[i]) THEN
                mTop = MAX(mTop, ABS($m[i]))
            ENDIF
        NEXT
        best = $at[0]
        worst = $at[7]
        gap = $s[best] - $s[worst]

        // -- 5. The tags at the end of the curves ---------------------
        IF showCurves AND showTags THEN
            FOR i = 0 TO 7 DO
                (cr, cg, cb) = tint(i)
                tag = $cd[i]
                // One tag in two is pushed further right, so that two
                // curves side by side keep readable tags
                DRAWLABEL(barindex + 3 + 7 * ($rk[i] MOD 2), $s[i], tag, arrowleft, small) COLOURED(14, 18, 30) FILLCOLOR(cr, cg, cb) BORDERCOLOR(cr, cg, cb)
            NEXT
        ENDIF

        IF showTable THEN
            // -- 6. The table: one column per currency ----------------
            // A neutral grey card with its own text colours: it reads
            // the same on a dark and on a light chart. The strongest
            // currency is in the first column.
            board = DRAWTABLE(10, 9, topleft) FILLCOLOR(42, 45, 52, 245) BORDERCOLOR(84, 90, 102) COLOURED(238, 240, 244)
            wTxt = measure
            IF rolling THEN
                wTxt = "last " + rollLen + " candles"
            ENDIF
            TABLEMERGE(board, 0, 0, 1, 9)
            TABLECELL(board, 0, 0, "Forex dashboard · " + wTxt + " · strongest on the left", bold, center, 14) COLOURED(238, 240, 244)
            TABLECELL(board, 1, 0, "Currency") COLOURED(168, 175, 188)
            TABLEMERGE(board, 2, 0, 3, 1)
            TABLECELL(board, 2, 0, "Strength, %") COLOURED(168, 175, 188)
            TABLEMERGE(board, 5, 0, 2, 1)
            TABLECELL(board, 5, 0, "Path") COLOURED(168, 175, 188)
            TABLECELL(board, 7, 0, "Last " + momLen + " candles") COLOURED(168, 175, 188)
            TABLECELL(board, 8, 0, "Regime") COLOURED(168, 175, 188)
            FOR i = 0 TO 7 DO
                c = 1 + $rk[i]
                (cr, cg, cb) = tint(i)
                tag = $cd[i]
                TABLECELL(board, 1, c, tag, bold, center, 13) COLOURED(cr, cg, cb) FILLCOLOR(58, 62, 72)
                // The dial: its needle is upright at zero, to the right
                // for a currency that gained, to the left for one that lost
                sTxt = ROUND($s[i] * 100) / 100
                IF $s[i] >= 0 THEN
                    lbl = "+" + sTxt + " %"
                ELSE
                    lbl = "" + sTxt + " %"
                ENDIF
                TABLEMERGE(board, 2, c, 3, 1)
                TABLEGAUGE(board, 2, c, $s[i], 0 - top, top, lbl) GRADIENTCOLOR($s[i], 0 - top, top, "#f0555f", "#aab0bc", "#3cd296")
                TABLEMERGE(board, 5, c, 2, 1)
                // The recent move: the longer the bar, the larger the move,
                // green for a gain and red for a loss
                IF $m[i] >= 0 THEN
                    TABLEBAR(board, 7, c, $m[i], 0, mTop) COLOURED(70, 215, 155)
                ELSE
                    TABLEBAR(board, 7, c, 0 - $m[i], 0, mTop) COLOURED(255, 110, 120)
                ENDIF
                // The regime: the strength and the recent move together
                IF $s[i] >= 0 AND $m[i] >= 0 THEN
                    TABLECELL(board, 8, c, "leading", bold, center) COLOURED(70, 215, 155)
                ELSIF $s[i] >= 0 THEN
                    TABLECELL(board, 8, c, "weakening", center) COLOURED(250, 195, 80)
                ELSIF $m[i] >= 0 THEN
                    TABLECELL(board, 8, c, "improving", center) COLOURED(110, 170, 255)
                ELSE
                    TABLECELL(board, 8, c, "lagging", bold, center) COLOURED(255, 110, 120)
                ENDIF
            NEXT
            // The mini charts read a curve each, so they are written one
            // by one, in the column of the currency. They draw the
            // currency against the basket over the last candles, without
            // the restart of the day.
            nSpark = MIN(sparkLen, 200)
            TABLESPARK(board, 5, 1 + $rk[0], xEUR, nSpark) COLOURED(70, 140, 255)
            TABLESPARK(board, 5, 1 + $rk[1], xGBP, nSpark) COLOURED(175, 110, 255)
            TABLESPARK(board, 5, 1 + $rk[2], xAUD, nSpark) COLOURED(0, 200, 215)
            TABLESPARK(board, 5, 1 + $rk[3], xNZD, nSpark) COLOURED(165, 205, 60)
            TABLESPARK(board, 5, 1 + $rk[4], xUSD, nSpark) COLOURED(240, 195, 50)
            TABLESPARK(board, 5, 1 + $rk[5], xCAD, nSpark) COLOURED(240, 100, 180)
            TABLESPARK(board, 5, 1 + $rk[6], xCHF, nSpark) COLOURED(250, 140, 50)
            TABLESPARK(board, 5, 1 + $rk[7], xJPY, nSpark) COLOURED(175, 182, 196)

            // The widest gap: the strongest currency against the weakest
            gTxt = ROUND(gap * 100) / 100
            bTxt = ROUND($s[best] * 100) / 100
            wkTxt = ROUND($s[worst] * 100) / 100
            IF best < worst THEN
                sumTxt = "Widest gap · " + $cd[best] + $cd[worst] + " up " + gTxt + " %"
            ELSE
                sumTxt = "Widest gap · " + $cd[worst] + $cd[best] + " down " + gTxt + " %"
            ENDIF
            sumTxt = sumTxt + " · " + $cd[best] + " +" + bTxt + " %, " + $cd[worst] + " " + wkTxt + " %"
            TABLEMERGE(board, 9, 0, 1, 9)
            TABLECELL(board, 9, 0, sumTxt, bold, center, 12) COLOURED(250, 195, 80)

            // -- 7. The heat map of the 28 pairs ----------------------
            // A cell is the move of the pair made of the currency of its
            // row against the currency of its column. Rows and columns
            // follow the ranking, so the map goes from green to red.
            IF showMatrix THEN
                TABLEMERGE(board, 0, 9, 1, 9)
                TABLECELL(board, 0, 9, "The 28 pairs · row against column, %", bold, center, 14) COLOURED(238, 240, 244)
                TABLECELL(board, 1, 9, "") FILLCOLOR(58, 62, 72)
                FOR a = 0 TO 7 DO
                    i = $at[a]
                    (cr, cg, cb) = tint(i)
                    tag = $cd[i]
                    TABLECELL(board, 1, 10 + a, tag, bold, center, 12) COLOURED(cr, cg, cb) FILLCOLOR(58, 62, 72)
                    TABLECELL(board, 2 + a, 9, tag, bold, center, 12) COLOURED(cr, cg, cb) FILLCOLOR(58, 62, 72)
                    FOR b = 0 TO 7 DO
                        j = $at[b]
                        IF a = b THEN
                            TABLECELL(board, 2 + a, 10 + b, "·", center) COLOURED(168, 175, 188)
                        ELSE
                            v = $s[i] - $s[j]
                            vTxt = ROUND(v * 100) / 100
                            IF vTxt > 0 THEN
                                cellTxt = "+" + vTxt
                            ELSE
                                cellTxt = "" + vTxt
                            ENDIF
                            IF heat = "Soft" THEN
                                TABLEHEAT(board, 2 + a, 10 + b, v, 0 - gap, gap, cellTxt)
                            ELSE
                                TABLEBG(board, 2 + a, 10 + b, GRADIENTCOLOR(v, 0 - gap, gap, "#d0404c", "#3a3e48", "#1fa573"))
                                TABLECELL(board, 2 + a, 10 + b, cellTxt, center) COLOURED(245, 246, 248)
                            ENDIF
                        ENDIF
                    NEXT
                NEXT
            ENDIF
        ENDIF
    ENDIF
ENDIF

// -- 8. The curves ----------------------------------------------------
// Adding an undefined value hides the eight curves when they are off;
// the zero line stays, so the panel keeps its scale.
shift = 0
IF showCurves = 0 THEN
    shift = undefined
ENDIF

RETURN 0 COLOURED(120, 128, 142) STYLE(dottedline, 1) AS "Zero", sEUR + shift COLOURED(70, 140, 255) STYLE(line, 2) AS "EUR", sGBP + shift COLOURED(175, 110, 255) STYLE(line, 2) AS "GBP", sAUD + shift COLOURED(0, 200, 215) STYLE(line, 2) AS "AUD", sNZD + shift COLOURED(165, 205, 60) STYLE(line, 2) AS "NZD", sUSD + shift COLOURED(240, 195, 50) STYLE(line, 2) AS "USD", sCAD + shift COLOURED(240, 100, 180) STYLE(line, 2) AS "CAD", sCHF + shift COLOURED(250, 140, 50) STYLE(line, 2) AS "CHF", sJPY + shift COLOURED(175, 182, 196) STYLE(line, 2) AS "JPY"
No ITF file for this code
A Studio Only code is not imported into ProRealTime™. Copy it and paste it into the ProRealCode Studio editor.
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

ProRealCode ProRealCode
Loading...