Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 835
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It's all about the dumb broker who draws Monday as a Sunday candle on the daily chart, but instead of Monday some xxx artist drew his own candle. Now I think how to use correct data of previous days. I have to make an Expert Advisor for all brokers. And specifically to find the freaking minimum and maximum of the last working day.
Sorry for any scribbles, this is my first one.
Everything in it suits me except one, I would like to see indicators from hourly chart on m5.
int sh = iBarShift(NULL, 60, Time[i], false);
Close[i] => iClose(NULL,60,sh)
iMA(NULL,60,....,sh)
Using iHighest(),iLowest(), how many M5 bars in a day is known, the offset to the end of the previous day, I think, can also be calculated.
I did the calculation on the hour hand, problem solved, thank you very much.
int Min=iLowest(NULL, PERIOD_H1, MODE_LOW , 24, Hour());
int Max=iHighest(NULL, PERIOD_H1, MODE_HIGH, 24, Hour());
price1=iLow(NULL, PERIOD_H1,Min);
price2=iHigh(NULL,PERIOD_H1,Max);
And here's such a small question, how to determine the situation when the terminal has just started.
I need to run del=ObjectsDeleteAll(0,OBJ_HLINE); at next start of terminal
And here's a small question, how to determine the situation when the terminal has just started.
I need to run del=ObjectsDeleteAll(0,OBJ_HLINE); at next start of terminal
But, it is only possible through the daily chart data.
What do you mean by daily chart data? Switching the chart? There is no need to switch.
evillive, Thanks for the response, could you please poke me in which part of the code this needs to be inserted.
Hello to all participants! Please help me to set up the indicators. I'm not very good at this science.
1. Indicator SimpleBars - does not save settings (colour, lines, etc.) when changing timeframe, increasing or decreasing the graph, etc.. The settings are also lost in the template. When I run MT4, always have to correct. (( I use it simply as an indicator, not in my EA. Help to adjust who can.
And another indicator is the 2MA with clouds. It doesn't save the settings either. It's a real trouble. Somehow no problems with other indicators, but this one glitches one after another. Help me, please fix it.
//+------------------------------------------------------------------+
//| ytg_DveMashki_ind.mq4
//| Yuriy Tokman |
//| yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link "yuriytokman@gmail.com"
#property indicator_chart_window
#property indicator_buffers 2
//#property indicator_color1 //Green
//#property indicator_color2 //Red
//#property indicator_width1 //4
//#property indicator_width2 //4
//----
extern color color1 = Green;
extern colour colour2 = Red;
extern int width1 = 0;
extern int width2 = 0;
extern int style1 = 0;
extern int style2 = 0;
extern int ma_1 = 25;
extern int ma_2 = 50;
extern int method = 0;
extern int price = 0;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//----
int ExtCountedBars=0;
//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM, style1, width1, color1);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM, style2, width2, color2);
SetIndexBuffer(1,ExtMapBuffer2);
IndicatorShortName("yuriytokman@gmail.com");
SetIndexLabel(0, "yuriytokman@gmail.com");
SetIndexLabel(1, "yuriytokman@gmail.com");
//----
SetIndexDrawBegin(0,10);
SetIndexDrawBegin(1,10);
//---- indicator buffers mapping
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexBuffer(1,ExtMapBuffer2);
Comment("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n yuriytokman@gmail.com");
return(0);
}
//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
int start()
{
if(Bars<=10) return(0);
ExtCountedBars=IndicatorCounted();
//---- check for possible errors
if(ExtCountedBars<0) return(-1);
//---- last counted bar will be recounted
if (ExtCountedBars>0) ExtCountedBars--;
int=Bars-ExtCountedBars-1;
while(pos>=0)
{
ExtMapBuffer1[pos]=iMA(Symbol(),0,ma_1,0,method,price,pos);
ExtMapBuffer2[pos]=iMA(Symbol(),0,ma_2,0,method,price,pos);
pos--;
}
//----
return(0);
}
//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Hello to all participants! Please help me set up the indicators. I'm not good at this science.
1. Indicator SimpleBars - does not save settings (colour, lines, etc.) when changing timeframe, increasing or decreasing the graph, etc.. The settings are also lost in the template. When I run MT4, always have to correct. (( I use it simply as an indicator, not in my EA. Help to adjust who can.
Thanks for the tip. That's what I thought the message was like, it doesn't look good. Good to know. Correcting the message.