Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have a multi-timeframe indicator for metatrader which colours the background of the chart that i'm on, based on the MACD cross of whichever timeframe I choose.
Is there an NT7 version available?
Can you help answer these questions from other members on NexusFi?
As far as I know, MetaTrader only uses minute charts. The best solution depends on your case:
(a) You can calculate the MACD values for a multiple of the original chart period (for example if you have a 5-minute chart, you can calculate the MACD for 10-minute, 15-minute, bars etc. , or if you have a 233-tick chart, you can calculate the MACD based on 466-tick bars, 699-tick bars. Those values can be calculated from the original bar series.
(b) To speed up the indicator you can use a different MACD formula to calculate them from the original bar series only. I have already coded such an indicator.
(c) A real multi-timeframe indicator is more difficult to code and needs to load a secondary bar series. There are some limitations to its use, when being called by a strategy. However you are very flexible, you can for example display an MACD calculated from 1000-volume bars on 8-Renko chart.
Comparison:
(a) requires synthetic bars, indicator coding is difficult
(b) fastest indicator, as there is a specific solution for the MACD (which is itself a derivative of EMAs)
(c) more work to code it properly
The difficulty is the treatment of the unstable period. To understand this imagine a MACD calculated from hourly bars displayed on a 5-min chart. When the hour is not closed, all hourly MACD values are preliminary, so if price moves up or down you would eventually need to repaint until the beginning of the hour, unless you accept to use the value at the end of the prior hour.
The solution (b) is a special approach which will work without repainting.
So you would need to explain, what you really need, and what you don't.
The one of I have uses minute charts which is fine for me.
I can have open any timeframe chart, and can choose what 'macd timeframe' I want (which colours the background of my current chart, based on whether it's crossed up or down)
The issue of the unstable period is sometimes apparent. Yesterday my chart was light green as if the bigger timeframe MACD was crossed up, although if you went to the bigger timeframe, the macd was actually crossed down.
This I assume is because it was waiting for the bigger timeframe's bar to end. It later re-painted the indicator which I didn't much like.
In an ideal world, there'd maybe be a setting to be able to choose how it handles the unstable period, although for now, whilst playing around with some ideas, I'd be happy with anything.
The problem with the unstable period can be handled if you tweak the MACD formula. The MACD is based on a few EMAs and each of the EMAs has a smoothing constant k. All you need to do is to calculate a new smoothing constant for the higher timeframe. For example if your larger timeframe MACD is N times the bar period, then you can calculate the new smoothing constant k_new as 1 - Nth root of (1-k). This will not get you the original MACD, but something that comes very close, and you will benefit from two huge advantages
-> unstable period reduced to the last bar of the smaller timeframe
-> lower CPU load
I have already once tweaked a MACDOverlay, which is shown in the chart attached. However, this is not what you look for, as the four MACDs below are normalized to allow for the overlay. The classic MACD does not have any normalization.
NinjaTrader does not store historical bid and ask data. The VisualSMA also works with historical data, and does not use bid or ask data. Basically no moving average does.
The Visual SMA loads a secondary bar series (minute, tick, volume, range or Renko) and calculates the moving average by using that bar series. All calculations use the last price traded either historical data from the historical data base, or real-time data when connected to a datafeed or replay data.
The result is then displayed on the chart with the primary bars. The main advantage of the VisualSMA is that you can calculate a moving average from a secondary bar series without paying the price of non-equidistant bar spacing. If you do not mind unevenly spread bars, then you do not need the VisualSMA.
That affects just the calculation of RJay'S Renko Hybrid, which are the primary bars. It has no impact on how the indicator calculates, as it always collects the last price.
I still have an issue with my version of the VisualSMA and Renko bars, which I have to check. Will take some time to answer.
Small question, on the visual's the nodes are always showed on the input panel, is it posible to change that so they showing always with the line no matter in wich panel they are.
I 'm trying to use "VisualSMA" with displacement (positive number) and there is small issue with line plot color (last bar only) that paints with default gray color instead the selected rising/falling colors.
I've noticed that this behavior exist in all indicators that use "PlotColors[0][x]"
And my way to solve this in my indicators, is to use the inverse displacement value in "PlotColors"
I hope you will have time to check this issue.
Thanks