Bjorgum MTF MA

  • Up to 3 MA's can be applied at the users discretion
  • Choose between 10 different average types including favorites from the Bjorgum series from HEMA to Reversal T3's
  • Each MA can be independently set
  • Go Multi-timeframe! Any MA can be set to any timeframe of reference you choose (ex. using 3 different timeframes of higher resolution to your chart reference to establish a multi-time frame trend)
  • RSI HEATMAP. Use the bar color or the MA color selection toggle to set your color to reference RSI on a gradient. This helps to establish clear visual reference to momentum on top of trend analysis
  • Assigning RSI bar color to an MA of a higher time frame can allow you to see visual reference of momentum of the greater trend that may be at play.
  • Example: trying to get short on a 15min while your 1hr and 4hr RSI Heatmap burns deep in oversold.
  • RSI color can be assigned to the bar color, the MA (1,2 or 3), or both. Alternatively, bar color can be assigned to a more simple rising/ falling MA color and price above/ below the MA for bar color.

The Idea

The original inspiration behind the script came from an observation of a constant struggle of Pinecoders of both youth or experience to find accurate multi-timeframe indicators that do not repaint, and appear as should on historical bars, while performing reliably in real time. I encourage you to scroll the Pinecoders FAQ on a recent piece explaining the difficulties and caveats of different approaches, but I would like to reference the elimination of the historical bar offset for THIS purpose. MA's are based on closing prices, that is to say they are confirmed and will not change once the bar has closed. There is no need to offset these for historical reference. The purpose of the historical offset is best exemplified, for example, with an intraday strategy involving daily breakouts. Let's entertain going long on a break to a new daily high. We would not know that in real time so we need to reference the previous bars close for BACKTESTING purposes, otherwise we get "lookahead bias". There is no shortage of strategies unintentionally employing this bias out there (I'm sure you have come across them with their unrealistic results).

There is no worry of repainting with the MTF security function included within this script, nor will it offset for something involving lookahead bias. I encourage those that are playing with the code or perhaps writing strategies of their own to borrow the functions within. There is also a function that will return the 10 MA variable selection - yours to keep.

With all that in mind, I wanted a practical script that is easily deployable in everyday trading for the average trader that gives the user a firm grip on their trading steering wheel equipped with the feel of the road. Incorporating several MA's of differing times with the RSI heatmap gives a good visual reference and feel to your trading environment, while offering a level of customization that will fit an individuals personal trading style. The RSI heatmap gradient is per percentage between 30 and 70 and your 2 colors - anything outside of those levels gives you the vibrant bias color

Below I walk through 2 examples of live trades scenarios I made using the mindset the script offers.

The Trade


Timeframe: 4hr chart
- 3 Tilson MA's of varying length are deployed at varying intraday time frames
- A bullish pattern in an uptrend offers a possible trade allowing entry from a low risk point from the pattern low
- See the chart for notes and observations using the script
- Notice how the heatmap brightens up as price extends far away from the averages - your risk has elevated for a new position
- Notice the heatmap cool off while price action consolidates sideways

The Trade


Timeframe: 4hr chart
- 3 EMAs are employed - same length (50), with 3 successive timeframe resolutions
- A downtrend is formed with a sharp move to stack the EMAs into layers
- A pull back opportunity presents itself in bearish consolidation
- Notice a Doji star at resistance establishing a swing high as RSI cools off into the EMA dynamic resistance for entry
- An '"equal legs" measured move can be used for a trade target with a stop out above the swing high.
- Again, take note of distance from EMA's, the heatmap in combination with trend development surrounding the MA's

These were just two ideas to show you an example of how to implement some strategy into your trading and to get some interesting use from the indicator. Hope you enjoyed the read and happy trading.
Notas de Lançamento: Updated the security function bar state offset swapping barstate.isconfirmed with barstate.isrealtime and changing the position of 0 and 1. Although the change should seem unnoticeable, this aligns with the manual and Pinecoders best practice.
Notas de Lançamento: This aligns with the PineCoders preferred method outlined here:

Sorry for the double re-publish :)

Can buy me a coffee here...

BTC: bc1qfdf6rnzyhsj67y9atdrdyugy8x9hsvry4h3fvz

Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?