3 Attachment(s)
Best Indicator Ever "The Holy Grail" Need Evolving
This is my best indicator. So far so good with no loss (100% profit) and just only 14% drawn down plus 30% gain in one month. One important thing again is, it just use really small deposit load about 2% to gain profit.
but It need evolving it to MT5, any help will be greatly appreciate. Thank you.
Attachment 34879
Attachment 34884
Indicator MQ4 Strategy Builder
Indicator MQ4 Strategy Builder
Looking for an indicator without limits or its analog
[MEDIA=youtube]gIyju6AfFmY[/MEDIA]
Simple Version - Works only with the AUD / USD pair at all time frames
mql5.com/en/market/product/35451
1 Attachment(s)
Need help for conversion to mtf version
Hi Igorad, ND
Can you modified the indicator into MTF version ?
Thanks in advance
Regards,
chartartist
Attachment 37427
2 Attachment(s)
Quotation For Coding Task
Hi there coders, I Wanted to consult you to know how much would cost to fix this indicator here called cumulative delta. This is the best cumulative delta I have ever seen for MT4, it is spot on but it has a downfall: it does not plot historical data when you load it. It starts plotting as the ticks come live. It has a "record ticks" function to save history, but I think it is badly implemented because when you load the indicator and it plots the historical data from the tick file, the historical data looks good, but then the new data plotted with the incoming live ticks look weird, off, distorted, you just canīt trust it. Then if you wanna use the indicator you have to leave your computer on logged into the MT4 from evening til the next day so you have half a day of data to analyze e compare levels for the day, and This is unsustainable. I would say that even half day of data is not enough because the quantity of data have an impact on how the recent data is plotted. The less data, less reliable (example attached).This is unsustainable. I thought I had found a solution by running the indi on strategy tester and grabbing the recorded ticks file there, it works but just for historical analysis, because as soon as the ticks come, the new plotted data is off. So what I have been doing, which is a pain in the ass, is running strategy tester every 5min to see the current correct data, that is awful... I really canīt understand why it works so beautifully in strategy tester, but then live it fucks up. So I think that a solution for this is to embed in the cumulative delta code the same algorithm used by strategy tester to simulate the ticks by reading the 1min .HST file, and this way fooling the indicator. This solves the problem of not having historical data when we load the indicator, just add an option to choose how many bars to load historically in indi settings. The indicator will read the 1min .HST every second to plot live, will not use the incoming live ticks. Another user input that I want is a "reset time" input, so I the calculation will reset to zero level at every daily bar (00:00 in my case), or NY open (16:30 in my case), it no time set then indi just keeps plotting as it does now, continuously.
I have found those articles here that explains how the ticks are simulated in the strategy tester using the 1min data, so it is just a matter of embedding this code into the cumulative delta code:
https://www.mql5.com/en/articles/1511
https://www.mql5.com/en/articles/75
Here I show you how the cumulative delta plotted using simulated ticks is doing a better job than the live ticks:
Attachment 39941
Here the indicator to mod:
Attachment 39942
1 Attachment(s)
Please help me to write loop MA indicator
Dear members who are good at coding Mql4.
I would like to ask for help with indicators looking at the previous day's data.
So I already have yesterday's High Low indicator and it is displayed today.
But I want to add MA indicator with levels which calculates yesterday's high low.
like this the picture.
https://i.imgur.com/e9DiUfy.png
Thank you very much for your help.
This code indicator
Code:
//+------------------------------------------------------------------+
//| MTF_HI_LOW_v1.mq4 |
//| Copyright Đ 2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright Đ 2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property link " modified by cja "
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 White
#property indicator_color2 White
#property indicator_color3 White
extern int BarsCount = 100;
extern int MAperiod = 100;
extern int CountDays=100;
extern bool Show_LABELS = true;
extern bool Show_MA = true;
extern bool Show_PreviousDaily = true;
extern bool Xtend_Prev_DailyLine = false;
extern color line_color_PreviousDaily = Aqua;
extern int PreviousLine_Style = 2;
extern int Shift_Prev_LABEL = 10;
extern bool Show_CurrRectangles_Display = false;
extern bool Show_Rectangles = true;
extern bool Rectangle_Curr_DayPeriod_only = false;
double max =0;
double min =0;
double Inc0 = 0.0000;
double Inc1 = 0.0000;
double Inc3 = 0.0000;
#define Curr_DG "Curr_DG"
#define Curr_WG "Curr_WG"
#define Curr_MG "Curr_MG"
datetime time1;
datetime time2;
datetime time3;
datetime time4;
datetime time5;
datetime time6;
//******************************
//currTimes
datetime time7;
datetime time8;
datetime time9;
datetime time10;
datetime time11;
datetime time12;
//********************************
//Pivot
double upper[], middle[], lower[];
double mmiddle,bottom,top;
double DHi,DLo;
double DHigh,DLow;
double highD,lowD,closeD;
double PD,PW,PM;
int shift, num;
void ObjDel()
{
for (;num<=CountDays;num++)
{
ObjectDelete("Previous_DailyHi["+num+"]");
ObjectDelete("Previous_DailyLo["+num+"]");
ObjectDelete("CurrentDailyHi["+num+"]");
ObjectDelete("CurrentDailyLo["+num+"]");
}
}
void PlotLineD(string dname,double value,double line_color_Daily,double style)
{
ObjectCreate(dname,OBJ_TREND,0,time1,value,time2,value);
ObjectSet(dname, OBJPROP_WIDTH, 1);
ObjectSet(dname, OBJPROP_STYLE, PreviousLine_Style);
ObjectSet(dname, OBJPROP_RAY, Xtend_Prev_DailyLine);
ObjectSet(dname, OBJPROP_BACK, true);
ObjectSet(dname, OBJPROP_COLOR, line_color_Daily);
}
int init()
{
IndicatorShortName("MTF_HI_LOW");
SetIndexStyle(0,DRAW_LINE);
SetIndexShift(0,0);
SetIndexDrawBegin(0,0);
SetIndexBuffer(0,upper);
SetIndexStyle(1,DRAW_LINE);
SetIndexShift(1,0);
SetIndexDrawBegin(1,0);
SetIndexBuffer(1,middle);
SetIndexStyle(2,DRAW_LINE);
SetIndexShift(2,0);
SetIndexDrawBegin(2,0);
SetIndexBuffer(2,lower);
//---- indicators
return(0);
}
int deinit()
{
max =0;
min =0;
ObjectsDeleteAll(0,OBJ_RECTANGLE);
ObjectsDeleteAll(0,OBJ_TRENDBYANGLE);
ObjectsDeleteAll(0,OBJ_TEXT);
ObjDel();
Comment("");
return(0);
}
int start()
//*******************************************************************************************
{
CreateDHI();
}
void Create_DailyLineHI(string dLine, double start, double end,double w, double s,color clr)
{
ObjectCreate(dLine, OBJ_RECTANGLE, 0, iTime(NULL,1440,0), start, Time[0], end);
ObjectSet(dLine, OBJPROP_COLOR, clr);
ObjectSet(dLine,OBJPROP_RAY,false);
ObjectSet(dLine,OBJPROP_BACK,Show_Rectangles);
ObjectSet(dLine,OBJPROP_WIDTH,w);
ObjectSet(dLine,OBJPROP_STYLE,s);
}
void DeleteCreate_DailyLineHI()
{
ObjectDelete( Curr_DG);ObjectDelete( Curr_WG);ObjectDelete( Curr_MG);
}
void CreateDHI()
{
DeleteCreate_DailyLineHI();
ObjectsDeleteAll(0,OBJ_RECTANGLE);
CreateWHI();
}
void Create_DailyLineWHI(string WLine, double start, double end,double w, double s,color clr)
{
ObjectCreate(WLine, OBJ_RECTANGLE, 0, iTime(NULL,10080,0), start, Time[0], end);
ObjectSet(WLine, OBJPROP_COLOR, clr);
ObjectSet(WLine,OBJPROP_RAY,false);
ObjectSet(WLine,OBJPROP_BACK,Show_Rectangles);
ObjectSet(WLine,OBJPROP_WIDTH,w);
ObjectSet(WLine,OBJPROP_STYLE,s);
}
void DeleteCreate_DailyLineWHI()
{
ObjectDelete( Curr_WG);
}
void CreateWHI()
{
DeleteCreate_DailyLineWHI();
ObjectsDeleteAll(0,OBJ_RECTANGLE);
CreateMHI();
}
void Create_DailyLineMHI(string MLine, double start, double end,double w, double s,color clr)
{
ObjectCreate(MLine, OBJ_RECTANGLE, 0, iTime(NULL,43200,0), start, Time[0], end);
ObjectSet(MLine, OBJPROP_COLOR, clr);
ObjectSet(MLine,OBJPROP_RAY,false);
ObjectSet(MLine,OBJPROP_BACK,Show_Rectangles);
ObjectSet(MLine,OBJPROP_WIDTH,w);
ObjectSet(MLine,OBJPROP_STYLE,s);
}
void DeleteCreate_DailyLineMHI()
{
ObjectDelete( Curr_MG);
}
void CreateMHI()
{
DeleteCreate_DailyLineMHI();
ObjectsDeleteAll(0,OBJ_RECTANGLE);
double Dailyhigh = iHigh(NULL,1440,0);
double Dailylow = iLow(NULL,1440,0);
if ( Rectangle_Curr_DayPeriod_only == false )
{
if (Show_CurrRectangles_Display == true )
{
}}
if ( Rectangle_Curr_DayPeriod_only == true )
{
if (Show_CurrRectangles_Display == true )
{
}}
//*******************************************************************************
int i;
double avg;
ObjDel();
num=0;
max =0;
min =0;
if (iBars(NULL,0) < BarsCount)
BarsCount = iBars(NULL,0) -MAperiod-1 ;
for (shift=CountDays-1;shift>=0;shift--)
{
time1=iTime(NULL,PERIOD_D1,shift);
i=shift-1;
if (i<0)
time2=Time[0];
else
time2=iTime(NULL,PERIOD_D1,i)-Period()*60;
if (i<0)
time4=Time[0];
else
if (i<0)
time8=iTime(NULL,PERIOD_D1,0)-Period()*60;
//*********************************************************
//for(int x=BarsCount; x>=0; x--) {
middle[i] = iMA(NULL, 0,MAperiod, 0, MODE_EMA, PRICE_CLOSE, i);
avg = findAvg(MAperiod, i);
upper[i] = middle[i] + avg;
lower[i] = middle[i] - avg;
//}
/* //for(int z=0; z<i; z++) {
mmiddle = iMA(NULL, 0, MAperiod, 0, MODE_EMA, PRICE_CLOSE,shift+1);
top = DHi - mmiddle;
if (top > max)
max = top;
bottom = DLo - mmiddle;
if (bottom < min)
min = bottom;
// avg = findAvg(period, x);
//upper[x] = middle[x] + 540;
//lower[x] = middle[x] - avg;
//}//return;
if (MathAbs(max) > MathAbs(min))
Inc3 = max;
else
Inc3 = min;
Inc1 = Inc3*1;
Inc0 = Inc3*1;
//for (x =BarsCount; x>=0; x--)
// {
upper[i] = iMA(NULL,0,MAperiod,0,MODE_EMA,PRICE_CLOSE,num) + Inc0;
lower[i] = iMA(NULL,0,MAperiod,0,MODE_EMA,PRICE_CLOSE,num) - Inc1;*/
highD = iHigh(NULL,PERIOD_D1,shift+1);
lowD = iLow(NULL,PERIOD_D1,shift+1);
closeD = iClose(NULL,PERIOD_D1,shift+1);
PD = (highD+lowD+closeD)/3.0;
DHi = iHigh(NULL,PERIOD_D1,shift+1);
DLo = iLow(NULL,PERIOD_D1,shift+1);
//***************************
//CurrDaily levels
DHigh = iHigh(NULL,PERIOD_D1,0);
DLow = iLow(NULL,PERIOD_D1,0);
time2=time1+PERIOD_D1*60;
time4=time3+PERIOD_W1*60;
time6=time5+PERIOD_MN1*60;
//******************************************
// CurrDaily levels
time8=time7+PERIOD_D1*60;
time10=time9+PERIOD_W1*60;
time12=time11+PERIOD_MN1*60;
num=shift;
if (Show_PreviousDaily == true)
{
PlotLineD("Previous_DailyHi["+num+"]",DHi,line_color_PreviousDaily,0);
PlotLineD("Previous_DailyLo["+num+"]",DLo,line_color_PreviousDaily,0);
}
//if (Show_MA == true)
//{
// middle = iMA(NULL, 0, period, 0, MODE_EMA, PRICE_CLOSE, 0);
//avg = findAvg(period, x);
//upper = middle[x] + avg;
//lower = middle[x] - avg;
//}
}
return(0);
if (Show_LABELS == true)
{
//Previous Levels
if(ObjectFind("HILOP") != 0){
ObjectCreate("HILOP", OBJ_TEXT, 0, Time[Shift_Prev_LABEL+10], DHi);
ObjectSetText("HILOP", "Prev / Daily High "+DoubleToStr(DHi,Digits)+" ", 8, "Arial", line_color_PreviousDaily);
}else{ ObjectMove("HILOP", 0, Time[Shift_Prev_LABEL+10], DHi);}
if(ObjectFind("HILO1P") != 0){
ObjectCreate("HILO1P", OBJ_TEXT, 0, Time[Shift_Prev_LABEL+10], DLo);
ObjectSetText("HILO1P", "Prev / Daily Low "+DoubleToStr(DLo,Digits)+" ", 8, "Arial", line_color_PreviousDaily);
}else{ ObjectMove("HILO1P", 0, Time[Shift_Prev_LABEL+10], DLo);}
}
return;
}
double findAvg(int MAperiod, int shift) {
double sum=0;
for (int x=shift;x<(shift+MAperiod);x++)
{
sum += High[x]-Low[x];
}
sum = sum/MAperiod;
return (sum);
}
//+------------------------------------------------------------------+