No one can help that there is only one option, read from history file? If that's the only option, does anyone have a ready-made way of identifying the necessary information in the history file.
You don't press the space bar, but hold down the power button for 5-10 seconds until the signal disappears.
In KVN among the moderators, you'll be team captain ... I'll repeat the question, maybe someone will answer it: the alert does not turn off after pressing the space bar ... Terminal version is the latest 500... I've never seen this before.
Guys, please give me a hint. I've already asked this question, but I haven't managed to get the code right.
Once again I'll tell you the gist of the idea. By Awesom indicator, from the bottom (below 0) to the top (above 0), the volume of the wave (indicator Volumes) is calculated.
The text label with the sum of the volume of the wave, should be printed on the indicator chart and calculated over the entire history.
I got this:
What is the error?
#property indicator_separate_window#property indicator_buffers 2#property indicator_color1 Red#property indicator_color2 SteelBlue#property indicator_width1 2//---- basic fan indicator parametersexternbool Show_AOLine_2=true;
externint SlowEMA3=34;
externint EMA=3;
externbool Show_Volume=true;
externdouble coaf=0.5;
//---- indicator buffersdouble AOBuffer3[];
double ExtMapBuffer1[];
double VLUP, AO_up,AO_dn;
double prhgh_e=0, prhgh_s, prlw_e=0, prlw_s;
datetime tmhgh, tmlw;
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+int init()
{
//---- drawing settingsstring name_ind = "Awesome_super_volumes";
IndicatorShortName("Awesome_super_volumes");
//---- AO_fan line 2 (basic)if(Show_AOLine_2 ==true){Show_AOLine_2=DRAW_LINE; }
else
{Show_AOLine_2=DRAW_NONE; }
SetIndexBuffer(0,AOBuffer3);
SetIndexStyle(0,Show_AOLine_2);
SetIndexLabel(0,"basic line");
SetIndexBuffer(1,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexLabel(1,"Volume");
//---- initialization donereturn(0);
}
//+------------------------------------------------------------------+//| Awesome Oscillator |//+------------------------------------------------------------------+int start()
{
int limit;
int counted_bars=IndicatorCounted();
double prev,current;
//---- last counted bar will be recountedif(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
//---- AO_fan + Volumes
AOBuffer3[i]=iMA(NULL,0,EMA,0,MODE_SMA,PRICE_MEDIAN,i)-iMA(NULL,0,SlowEMA3,0,MODE_SMA,PRICE_MEDIAN,i);
if (Show_Volume==true)
{
double nSum = Volume[i]*Point*coaf;
if (AOBuffer3[i]<=0)ExtMapBuffer1[i] = nSum;
if (AOBuffer3[i]>0)ExtMapBuffer1[i] = -nSum;
double Vol_Arr[];
if (AOBuffer3[i]<=0)Vol_Arr[i]=Volume[i]*Point*coaf;
if (AOBuffer3[i]>0)Vol_Arr[i] = -Volume[i]*Point*coaf;
}
}
//-- Поиск High & Time & Min_AO if (AOBuffer3[i]>0)
{
AO_up = AOBuffer3[i]*0.1+AOBuffer3[i];
prhgh_s = High[i];
if (prhgh_s >= prhgh_e) {prhgh_e = prhgh_s; tmhgh = Time[i];}
//SetText("Awesome_super_volumes"+Close[i], DoubleToStr(VLUP,0), tmhgh, AO_up, Black);
}
//-- Поиск Low & Time & Max_AOif (AOBuffer3[i]<0)
{
AO_dn = AOBuffer3[i]*0.1+AOBuffer3[i];
prlw_s = Low[i];
if (prlw_s > prlw_e) {prlw_e = prlw_s; tmlw = Time[i];}
//SetText("Awesome_super_volumes"+Close[i], DoubleToStr(VLUP,0), tmlw, AO_dn, Black);
}
// -- Пересчет баров от High до Lowif(NewBar())
{
int colbr = iBarShift(NULL,0,tmhgh)-iBarShift(NULL,0,tmlw);
int shift=iBarShift(NULL,0,tmhgh);
for (i=0; i<=colbr; i++)
{VLUP += MathAbs(iVolume(NULL,0, shift+i));}
}
Comment("Vol_",VLUP,prlw_e,prhgh_e);
for(i=0; i<limit; i++)
{
SetText("Awesome_super_volumes"+Close[i], DoubleToStr(VLUP,0), tmlw, AO_dn, Black);
}
//---- donereturn(0);
}
//+------------------------------------------------------------------+void SetText(string name, string Vl, datetime t1, double p1, color c)
{
// if (ObjectFind(name)!=-1) ObjectDelete(name);ObjectCreate(name,OBJ_TEXT,WindowFind("Awesome_super_volumes"),0,0,0,0);
ObjectSetText(name, Vl, 10, "Times New Roman", c);
ObjectSet(name, OBJPROP_TIME1 , t1);
ObjectSet(name, OBJPROP_PRICE1, p1);
ObjectSet(name, OBJPROP_COLOR, c);
}
bool NewBar()
{
staticdatetime lastbar = 0;
datetime curbar = Time[0];
if(lastbar!=curbar)
{
lastbar=curbar;
return (true);
}
else
{
return(false);
}}
1. Conversion function converts and variable changes in this function will not change if there is no tick. TimeToStr(TimeLocal(), TIME_MINUTES) - depends on the tick.
Do you have any idea how to pull out the time from Win32/User32 in order not to make the EA get stuck?
1. None of these functions are tick-dependent. You only need to call the function to get the return value. The indicator and Expert Advisor call it upon the arrival of a tick, but no big deal. You can loop an Expert Advisor or a script. The frequency of calls will be the same as in the indicator or script.
2. There is no sense. You will have to invent the same TimeLocal().
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
with the same looping?
I'll try
Please help me solve the problem with the shift limit in iHigh(Symbol(),timeframe,shift), which is limited to the number 1000.
iTime(Symbol(),timeframe,1001) gives 1970.01.01 00:00No one can help that there is only one option, read from history file? If that's the only option, does anyone have a ready-made way of identifying the necessary information in the history file.
You don't press the space bar, but hold down the power button for 5-10 seconds until the signal disappears.
In KVN among the moderators, you'll be team captain ... I'll repeat the question, maybe someone will answer it: the alert does not turn off after pressing the space bar ... Terminal version is the latest 500... I've never seen this before.
Guys, please give me a hint. I've already asked this question, but I haven't managed to get the code right.
Once again I'll tell you the gist of the idea. By Awesom indicator, from the bottom (below 0) to the top (above 0), the volume of the wave (indicator Volumes) is calculated.
The text label with the sum of the volume of the wave, should be printed on the indicator chart and calculated over the entire history.
I got this:
What is the error?
1. Conversion function converts and variable changes in this function will not change if there is no tick. TimeToStr(TimeLocal(), TIME_MINUTES) - depends on the tick.
Do you have any idea how to pull out the time from Win32/User32 in order not to make the EA get stuck?
1. None of these functions are tick-dependent. You only need to call the function to get the return value. The indicator and Expert Advisor call it upon the arrival of a tick, but no big deal. You can loop an Expert Advisor or a script. The frequency of calls will be the same as in the indicator or script.
2. There is no sense. You will have to invent the same TimeLocal().
I couldn't find anything in the textbook about what "&" means in the formal function parameters. Can you tell me what it affects and what it means?
https://docs.mql4.com/ru/basis/variables/formal
The second part of the page from the words "It is possible to pass parameters by reference..." Look carefully there Example.
Good afternoon.
Could you advise me on the best way to record the crossing of, say, stochastics:
on the first and third bar compare the values of the signal and main lines or the first and second ?