Simple multi-Time Frame conversion

MQL4 Göstergeler

İş Gereklilikleri

Hello developers,

The purpose of this indicator is to preserve value of indicator value on one Time-frame when turn chart on different TF. The underlying condition is:

if(iMA(NULL,D1,15,0,MODE_EMA,0,d1bar_1)>=iMA(NULL,D1,15,0,MODE_EMA,0,d1bar_2)) THEN value=1, else Value=-1


I knew how to do it using 1 method, named APPROACH 1 in the code. It is a bit long, especially when it come to lag value like today (D_0), yesterday (D_1)....


I am learning method 2, named APPROACH 2 which allow me simply create a value like indicator_1[I]=indicator_0[I+1]. The problem is that on H1, the [I+1] is 1 more H1 bar even though I want to preserve D1 value which associated with D1 bar.

With the help of other member, the preservation of D1 on any TF chart is done. I want you to follow exactly the same method for H4 and H1.

I try to fill in all other information, and essentially, all you need to do  is to make adjustment for H4 and H1 in the below section (If I am correct).

//---THIS SECTION IS FOR D1 CONVERISIOn-------------------------------------------------------------
//-this section is to make sure that on NON_D1 chart, value of D1 still "preserve and spread"
#define HR2400 86400       // 24 * 3600 = PERIOD_D1 * 60
int      TimeOfDay(datetime when=0){      if(when == 0)  when = TimeCurrent();
                                          return( when % HR2400 );            }
datetime DateOfDay(datetime when=0){      if(when == 0)  when = TimeCurrent();
                                          return( when - TimeOfDay(when) );   }
datetime Yesterday(datetime when=0){      if(when == 0)  when = TimeCurrent();
   int iD1 = iBarShift(NULL, PERIOD_D1, DateOfDay(when) - 1);
                                       return( iTime(NULL, PERIOD_D1, iD1) ); }
//--------------------------------------------------------------------------------------------------


//lag operation
   datetime  now = Time[i],
             yest = Yesterday(now);
   int      iYest = iBarShift(NULL,0, yest);
   D1new_indi_1[i]=D1new_indi[iYest];

I attached the code itself and the MA color indicator just so you can compare the result.


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(4)
Projeler
7
43%
Arabuluculuk
5
0% / 60%
Süresi dolmuş
3
43%
Serbest
2
Geliştirici 2
Derecelendirme
(34)
Projeler
80
34%
Arabuluculuk
13
31% / 54%
Süresi dolmuş
19
24%
Serbest
Benzer siparişler
Hello i am seeking a skilled MetaTrader 5 (MQL5) developer to modify an existing Telegram signal copier. The goal is to enhance the copier's functionality, reliability, and user experience. kindly bid this job to get started immediately
Hello, I’m looking for assistance with creating or customizing a TradingView indicator to suit my trading needs. If you have experience in this area, please reach out. Your help would be greatly appreciated. Thanks
Where are my developers colleagues . i want you to support me on existing work i just need a little addon on it. Am still a student kindly support me. You will be get paid at the end of the work. If you want more details maybe the worth of the project or any other thing let me know. THNAKS FOR THE SUPPORT
** Entry Condition **: - ** For Long**: The trade is entered **after BB + ** is confirmed. - ** For Short *: The trade is entered **after BB -* is confirmed. ### 2nd **Stop Loss **: - ** For long Entries *: stop loss is triggered on a ** candle close above the high* of the breaker block shown by the indicator. - ** For Short Entries **: stop loss is triggered on a ** candle close below the low ** of the breaker block
Hello, am in need of a developer that can help in developing a trading bot that can effectively navigate the foreign exchange (Forex) market or other financial markets to generate passive income. My objective is to create a sophisticated algorithmic trading system that can consistently produce profitable trades with minimal manual intervention. I am seeking a reliable and efficient solution that can be tailored to my
am looking for who help me convert tradingview indicator to mt5 car trading strategy and make sure you are an expert before u apply to this and also my budget for this is 30$ so the name of the indicator is Breaker Blocks with Signals (LuxAlgo) ### 1. ** Entry Condition **: - ** For Long**: The trade is entered **after BB + ** is confirmed. - ** For Short *: The trade is entered **after BB -* is confirmed. ### 2nd
I have a custom MT4 indicator that I need converted to MT5. I'll share the source code with the applicants. Please only apply if you have vast experience in converting complex indicators successfully to MT5, and making sure that the MT5 version functions exactly the same as the MT4 version
I need an expert to help me convert chopzone traingview pinescript to mt4, I need an expert to get it done for me on between 1 to 2 days i hope this will be done by then, i will attach the file and my budget is $30 as of minimum here
Looking for someone to edit/optimize and existing NN (neural network) in my EA so it is more compatible/profitable with the multiple strategies. The expert advisor is a portfolio expert advisor consisting of 33 separate advisors/strategies compiled into one. A NN has been added to the EA but it does not compliment or help the EA's performance. I've attached the original EA (without NN) as well as the EA with the NN
Procuro programador que consiga modificar essas estratégias, com a mesma capacidade de alteração das suas funcionalidades. Reitero, não consegui contato com o programador da fonte, nem mesmo mandando diversas mensagens no telegram! br.tradingview.com/script/PfpFNXyI-Braid-Filter/ br.tradingview.com/script/kv8N05R7-AlphaTrend-Screener/ Ambos os indicadores precisam agir em conjunto, tanto para as funcionalidades em

Proje bilgisi

Bütçe
10 - 15 USD
Geliştirici için
9 - 13.5 USD
Son teslim tarihi
from 1 to 2 gün