[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 370

 

advise how to correctly write the comment display, when you change the conditions it writes buy, although according to the conditions it should not, indicators have changed their values...

condition:

   
   if (cci11<cci10 && f 11<f10 && pic 1<=1 && pic 1!=0 ){ sigup=1; sigdw=0; }
   if (cci11> cci10 && f11>f10 && pic1<=1 && pic1!=0 ){ sigup=0; sigdw=1; }  
   if (sigup==1){order1="Buy";}
   if (sigdw==1){order1="Sell";}

at a peak other than one it should not write anything, if you write in the comment pic1==1, it outputs the same values

Comment("\n Pic1 ", pic1,
   "\n order1 ", order1)
 
vilard:

advise how to correctly write the comment display, when you change the conditions it writes buy, although according to the conditions it should not, indicators have changed their values...

condition:

at a peak other than one it should not write anything, if you write in the comment pic1==1, it outputs the same values



if (pic==1)
  Comment("\n Pic1 ", pic1,
   "\n order1 ", order1);
else 
  Comment("");
 
Vinin:


thanks, it's strange that I didn't think of it myself....
 
vilard:
thanks, i'm surprised i didn't figure it out myself....


I just didn't set the problem right.

vilard:

condition:

at a peak other than one it should write nothing, if you write pic1==1 in the comment, it outputs the same values


 
Desead:
What is the difference between writing an EA for Demo and for Real, apart from using the status check functions?
Not at all.
 
Hi! Can you tell me how to memorise the crossing price of the Ma price for the subsequent setting of a stop order at that price?
if(MaPrevious <= Close[2] && MaCurrent > Close[1] )
        {
         ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask,3,0,Ask,"",12134,0,Green);




 
skyjet:
Hi! Can you tell me how to memorise the crossing price of the Ma price for the subsequent setting of a stop order at that price?

HOW do I check the MA crossing with the required divergence?
 
Desead:
Tell me what is the difference between writing an EA for Demo and for Real, except for using state check functions?

There is no difference between demo and real, but the difference between tester and real/demo is drastic.

In the tester, speed is important to us, so we can store everything in variables, and then read the necessary information from them. In this case, we don't have to worry about storing the latest and most relevant information about the EA's state - everything is stored in variables and is taken from them. In the tester, all trading functions can be checked for correctness of data with minimum failures, and we don't have to worry about loss of connection, electricity, etc. ...

If you want to have real time and up-to-date information, each time when you need it you have to search through the data stored on the server, instead of taking it from variables - i.e. to use lots of these data iterations, which is very unpleasant for the tester ... :)

 
artmedia70:

There is no difference for demo and real, but for tester and real/demo it is drastically different.

In the tester, speed is important to us, so we can store everything in variables, and then read the necessary information from them. In this case, we don't have to worry about storing the latest and most relevant information about the EA's state - everything is stored in variables and is taken from them. In the tester, all trading functions can do with minimal checks for data correctness and no need to worry about loss of connection, electricity, etc. ...

In reality, to have fresh and up-to-date information, every time you need it you have to search for data stored on server, not take it from variables, i.e. use multiple iterations of this data, which is not very good for tester... :)

Thanks, that makes sense.

 
paladin80:
During the search of open positions, check the opening time using OrderOpenTime, which must be subtracted from the current TimeCurrent, and if the difference in the number of seconds is more than 3 days (>=3*24*60*60), then there he is, he has found the bastard. Then determine ticket of such order and number of ticket print to comment, then manually close from list.

Got it. Thank you very much. It is a good variant, but I cannot use historical data to test the system. That's what I wanted to automatically prescribe somehow. If you have any other options, please let me know.
Reason: