need help with multiple Timeframe

Created at 01 Feb 2024, 04:00
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
EV

evgenianikolaeva238

Joined 01.02.2024

need help with multiple Timeframe
01 Feb 2024, 04:00


Hi everyone, please help me

I have logic Macd crossover  , If cross above open buy and cross below open sell I run on Timeframe M1

And I want to M1 follow TF M15 it  possible to coding?  if the same direction to be traded

Example : TF M1 Macd cross above and macd signal.last(0) < 0 actually It will open buy but TF M15  macd signal.last(0) it not < 0   it will not open buy , unless macd signal.last(0) < 0 it will open buy.

How to code please help me
Thank you very much everyone


@evgenianikolaeva238
Replies

PanagiotisCharalampous
01 Feb 2024, 07:00

Hi there,

Here is an example of how you can initialize a MACD for the m15 timeframe

 var macd = Indicators.MacdCrossOver(MarketData.GetBars(TimeFrame.Minute15, SymbolName).ClosePrices, 26,12,9);

You can use it to perform the same checks as with your m1 MACD indicator.

Best regards,

Panagiotis


@PanagiotisCharalampous