Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 370
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
Install the latest build to the terminal, it's easier to write code in it, less likely to make mistakes, I advise!)
Corrected the part that was sent first, without the last part of the brackets, which are not clear why...
this is my exit from the EA, if all conditions are fulfilled then exit from the EA
i.e.
fail=true;
and then
if(fail) return(0);
it's me exiting the EA, if all conditions are met then the EA is exited
i.e.
fail=true;
and then
if(fail) return(0);
This is understandable, but in the code that was sent at the beginning, there are a lot of unnecessary brackets before the output function.)
The one I sent helped?!
if(fail) return(0);
If you insert my code in the EA https://www.mql5.com/ru/code before the place
if(or_bu==risk && tick_b==0) open(0)
if(or_sl==risk && tick_s==0) open(1);
then EA starts to trade differently, although in my code it should enter only after typing 740, initially my balance is 700 in the tester.
The values for the tests can be set as follows:
extern bool test=false; //turn objects off at test
extern int prof=2; // profit level
extern int int chag=1.7; // step between orders
extern int risk=0; //risk level
extern double lot = 0.01; // initial lot
extern double k_lot=2; // volume increment
extern double lot_max=100;
bool result;
bool fail=false;
The problem is that it trades differently, I can't figure out the date I took for the test in 2013. 11. 08. и 2013. 11 .09.
then the EA starts to trade differently, although in my code it should only enter after dialing 740, initially my balance is 700 in the tester.
Try to compile my code, let me know the result, then we'll think about it...
if it enters this code earlier than needed, then the problem is in the initial operator, let's see what's wrong
Try to compile my code, let me know the result, then we'll think about it...
If it enters this code earlier than needed, then the problem is in the start operator, let's see what's wrong there
Yeah, I compiled it, but the problem persists.... It feels like it's entering the code earlier than it should.
yes compiled, but the problem remains.... yes it feels like it goes into the code earlier, though it shouldn't.
That's the problem I think, you want to know the profit in quid and it returns in euros, for example
Try replacing the entire calculation of the first code statement with this:
and eventually compile this operator:
That's the problem I think, you want to know the profit in quid and it returns in euros, for example
Try replacing the entire calculation of the first code statement with this:
and eventually compile this operator:
The problem seems to be different, if I insert into an EA that does not work correctly, code that works correctly, then after compilation the EA does not work correctly, it feels like when you open a page in the browser, and it gives you the cache every time.
Even if you create a new EA and insert a working code there, it works crookedly for some reason.
...if I insert code that works incorrectly into an EA that works correctly, then after compilation the EA does not work correctly...
I can't help then) you need to go through the whole EA.
I can't help then) I need to go through the whole EA.
I seem to have found a bug=) the initial data where the step between orders is set to int and I put 1.7, I changed it to double and it worked fine=)
I seem to have found a bug=) in the initial data where the step between orders is set to int and I put 1.7, I changed it to double and it worked fine=)
Well hello)))) when you find a mistake, you realise that everything was easier than you thought)