Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 644
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
datetime is ulong
You should not have corrected his code at once, the man just does not understand elementary compiler keys, and to write a normal code you need to know these subtleties and use documentation!
I pointed out the antiquity of the video and if he copied it exactly as it was in the video he would succeed. But he took offense and complained about the post, which resulted in its deletion, while he himself is not even going to look into it!
It turns out it wasn't entirely for nothing. He hasn't even tried to understand the difference in the submitted code and it doesn't even work that way.
Generally, I don't like to prompt with code corrections either. But here it turned out to be "not the case". I have been interested in libraries for a long time, even had my own library. But having understood that I have to pass the entire library together with the Expert Advisor or indicator code, and explain what to put there... Not everyone understands this at once, I decided to give it up. This is an answer to the retort
This is the forum for trading, automated trading systems and strategy testing.
Any questions from newcomers on MQL4, help and discussion of algorithms and codes
Vitaly Gorbunov, 2018.10.03 10:37
Well, you can argue here who is more convenient to use what!Don't bother.
I understand that you can't help me.
I've removed #property strict, I've removed all properties except#propertylibrary
doesn't help.
Try plugging in my design, find the error,
and post the correct code, if this is the problem.
Forum on trading, automated trading systems and strategy tester
Any MQL4 beginners questions, help and discussion on algorithms and codes
Alexey Viktorov, 2018.10.03 11:56
I'm sitting on XP, MT4 1090 and it follows that I won't have any updates.
When I change time scale in MT4the chart constantly moves to the left or right - if I switch from a bigger scale to a smaller one (e.g. from daily to hourly) the data is half a year old on the screen. If I switch from a smaller to a bigger scale, it shows only the last 10 candlesticks. I have to perform constant gestures to make the chart look acceptable, which is annoying.
For your convenience, I have written a code that switches the scale on the keyboard and shifts the chart to the end:
void OnChartEvent(const int id,
const long &lparam,
const double &dparam,
const string &sparam)
{
string Key1_Value="1";
string Key2_Value="2";
string Key3_Value="3";
if(StringGetChar(Key1_Value,0)==lparam)
ChartSetSymbolPeriod(0,NULL,5);
if(StringGetChar(Key2_Value,0)==lparam)
ChartSetSymbolPeriod(0,NULL,60);
if(StringGetChar(Key3_Value,0)==lparam)
ChartSetSymbolPeriod(0,NULL,1440);
ChartNavigate(0,CHART_END,0);
}
Everything works, but ChartNavigate "freezes" the chart in place and won't let it scroll to the left. How to fix it?
I'm sitting on XP, MT4 1090 and it follows that I won't have any updates.
When I change time scale in MT4the chart constantly moves to the left or right - if I switch from a bigger scale to a smaller one (e.g. from daily to hourly) the data is half a year old on the screen. If I switch from a smaller to a bigger scale, it shows only the last 10 candlesticks. I have to perform constant gestures to make the chart look acceptable, which is annoying.
For the sake of convenience, I have written a code to switch the scale on the keyboard and shift the chart to the end:
There's a button there to make the chart shift itself.
Forum on trading, automated trading systems & strategy testing
Any questions for beginners on MQL4, help and discussion on algorithms and codes
Taras Slobodyanik, 2018.10.03 19:43
I tried to use the autoscrolling to shift the chart.
If I want to draw a trendline, the autoscroll does not allow to scroll the chart leftwards.
Especially since it only works when new ticks come in.
Auto-scrolling prevents the chart from scrolling to the left if, for example, a trend line needs to be plotted.
Especially since it only works when new ticks come in.
then like this