Hi Community,
I'm trying to create a code that has a simple MACD on 1 minute and 3 minute timeframe simultaneously. Problem is it doesn't work. In my Multicharts I have loaded both the 1 minute and the 3 minute charts into the same Window. But for the Indicator when I go into its properties and select 'base study on' I can only choose either the 1 minute or the 3 minute. Which means the only way to see a true multi-time frame indicator is to have a MACD indicator on the 1 minute and a separate MACD indicator on the 3 minute overlapping each other in the same Subchart.
But that won't work. I need one code that can generate trades based on the interaction of the 1 minute and 3 minute indicators on the same chart. Am I missing something?
In Tradingview it's easy you can just use the code "
macd_3 = request.security(syminfo.tickerid, "3", macd). But i'm struggling with how to do it for Multicharts.
EasyLanguage Code is below:
Inputs: FastLength(12), SlowLength(26), SignalLength(9);
Variables: FastMA(0), SlowMA(0), MACD(0), Signal(0), MACD_3(0), Signal_3(0),
FastMA = XAverage(Close, FastLength);
SlowMA = XAverage(Close, SlowLength);
MACD = FastMA - SlowMA;
Signal = XAverage(MACD, SignalLength);
Plot1(MACD, "MACD");
Plot2(Signal, "Signal");
// Calculate MACD and signal for 3 min timeframe
MACD_3 = MACD of Data2;
Signal_3 = XAverage(MACD of Data2, SignalLength);
Plot3(MACD_3, "MACD 3 min");
Plot4(Signal_3, "Signal 3 min");
I'm trying to create a code that has a simple MACD on 1 minute and 3 minute timeframe simultaneously. Problem is it doesn't work. In my Multicharts I have loaded both the 1 minute and the 3 minute charts into the same Window. But for the Indicator when I go into its properties and select 'base study on' I can only choose either the 1 minute or the 3 minute. Which means the only way to see a true multi-time frame indicator is to have a MACD indicator on the 1 minute and a separate MACD indicator on the 3 minute overlapping each other in the same Subchart.
But that won't work. I need one code that can generate trades based on the interaction of the 1 minute and 3 minute indicators on the same chart. Am I missing something?
In Tradingview it's easy you can just use the code "
macd_3 = request.security(syminfo.tickerid, "3", macd). But i'm struggling with how to do it for Multicharts.
EasyLanguage Code is below:
Inputs: FastLength(12), SlowLength(26), SignalLength(9);
Variables: FastMA(0), SlowMA(0), MACD(0), Signal(0), MACD_3(0), Signal_3(0),
FastMA = XAverage(Close, FastLength);
SlowMA = XAverage(Close, SlowLength);
MACD = FastMA - SlowMA;
Signal = XAverage(MACD, SignalLength);
Plot1(MACD, "MACD");
Plot2(Signal, "Signal");
// Calculate MACD and signal for 3 min timeframe
MACD_3 = MACD of Data2;
Signal_3 = XAverage(MACD of Data2, SignalLength);
Plot3(MACD_3, "MACD 3 min");
Plot4(Signal_3, "Signal 3 min");