[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 358

 

It has gone to extremes with an alert of 2 and should be between 2 and 200

int pos = iBarShift(0,0,iTime(0,1440,3))-IndicatorCounted();

for (int r=2; r<=200; r+=1){
for(; pos>=0; pos--){
Alert( r);
                   }      } // как говорит мой папа "ПЛОХО быть ИДИОТОМ" =))
 
costy_ >> :

>> it's gone to extremes with an alert of 2 and should be 2 to 200

int pos ;

for (int r=2; r<=200; r+=1){
pos = iBarShift(0,0,iTime(0,1440,3))-IndicatorCounted();
for(; pos>=0; pos--){
Alert( r);
                   }      }
 
costy_ писал(а) >>

You've already started doing something scary.

A second call to IndicatorCounted() will return the number of bars counted. And pos will become negative.

 
Vinin >> :

You've already started doing something scary.

A second call to IndicatorCounted() will return the number of bars counted. And pos will become negative.

Exactly, I'll have to count all the bars, I mean the last couple of days =))

Probably, because of the temperature and boredom I decided to implement the old idea of optimal sliding optimization for the last two days.

>> Thank you!

 
A couple of months ago I saw the https://forum.mql4.com/ru/17524,прочитал thread, downloaded the Expert Advisor, changed and reworked some things. I have been testing it on demo for a couple of months now and I want to start playing it for real, actually I already have it and I have even earned $20. However, my deposit of $480 has eaten all margin and it is good that the market has reversed and everything ended well.

I have not experienced in writing EAs for real account, I want to ask those who have, maybe they will see bugs or suggestions for improvement.

I would also appreciate it if you would look at the code and give me some suggestions on how to improve it.
 
Vitya >> :
>> A couple of months ago I saw the https://forum.mql4.com/ru/17524,прочитал branch, downloaded the Expert Advisor, changed and reworked some things. I have been testing it on demo for a couple of months and now I want to trade it for real. Actually I already have it and I have even earned $20. However, my deposit of $480 has eaten all margin and it is good that the market has reversed and everything ended well.

I have not experienced in writing EAs for real account, I want to ask those who have, maybe they will see bugs or suggestions for improvement.

Please take a look at it.

I hate to disappoint you, but the input data shows that

extern double K_1_1 = 279;//Стохастик M5
extern double P_1_1 = 8;//Стохастик M5
extern double S_1_1 = 56;//Стохастик M5
extern double K_1_2 = 95;//Стохастик M15
extern double P_1_2 = 6;//Стохастик M15
extern double S_1_2 = 16;//Стохастик M15

I can see straight away that it is optimised for a certain period of time, and my advice to you is to learn how to use optimisation, and optimise your EA for up to 3 days every day (depending on the current day of the week) and then it will be, well, kind of profitable.

And see all of the author's work, maybe he's doing it for the first time.

I had my first Expert Advisor on the history in a week with 1000 000 000 made 1000000000 and I still have the printout of it at home somewhere =))

 
Vitya писал(а) >>
A couple of months ago I saw the https://forum.mql4.com/ru/17524,прочитал thread, downloaded the Expert Advisor, changed and reworked some things. I have been testing it on demo for a couple of months and now I want to trade it for real, in fact, I already have and I have even earned $20. However, my deposit of 480$ ate all margin and the market reversed and everything ended well.

I have not experienced in writing EAs for real account, I want to ask those who have, maybe they will see bugs or suggestions for improvement.

I have no idea what to do with the code and I am not sure how to fix it.
I have no idea how many trades it opened.
 
Vinin >> :
And how many trades did he open for you?

>> on the real 13 before the margin ran out.

 
Vitya писал(а) >>

on the real 13 before the margin ran out

There is no control over the number of open positions. Now it will always be at the maximum open.

 
costy_ >> :

I hate to break it to you, but the input data

I don't want to disappoint you, but the input data is very clear, it's optimized for a certain period of time, and my advice is to learn to use optimization, and every day optimize YOUR EA for up to 3 days (depending on the current day of the week) and then it will be, well, sort of profitable.

The problem is that with any parameters there is no guarantee against a reverse trend, which leads to a loss of margin and consequences?

Is the sakmam code all clear for real?

Reason: