Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 529

 
tatianati:

Hello, I don't know where to place this question, the gist of it is this: sometimes EA writes a 7 gigabyte log file with one error, it writes (EURUSD,M15: Failed to close leading order, repeat operation), although it closes everything without error. I try to prohibit this EA to record its actions in the log, but it's no use, I need the log of the terminal.

Please advise how to prohibit this "creep" to keep the log? I understand that I have to use the Print option but how?

For comment Print. if you do not need it when working.
if ((OrderSymbol() == Symbol()) && (OrderMagicNumber() == mNumber)) {
               if (OrderType() == OP_BUY) {
                  error1 =  (OrderClose(OrderTicket(), OrderLots(), NormalizeDouble(Bid, Digits), Spread, Blue));
                  if (error1 == 1) {
                    // Print ("Лидирующий ордер закрыт успешно."); 
                     Sleep (500);   
                  } else {
                    // Print ("Ошибка закрытия лидирующего ордера, повторяем операцию. ");
It goes something like this.
 
tatbar:

i'm a newbie in a very tight spot so i just barely scraped together 100$ to start trading and to get out of the deepest pit i've known forex for 2 months now. i just opened a real account yesterday but i dont know how to install my advisor, what's the subscription and how much it costs, i dont know if i should order 1:200 and 0.1 lot in cents account or not.


too pathetic... "don't let me die" .... first hundred on the real, if you're a beginner, you'll get away with it... even with less leverage...

if you're in a difficult financial situation, don't even try... You may be three more years away from moving in... :-)))

To start making money here, you'll have to lose a few hundred... :-)))

It's easier to go to an underground casino, it's either yes or no... :-)))

Subscription is when, roughly speaking, someone who you think is successful trades for you ... :-)))

credits are the same quid...

 
zoritch:


it's too pathetic ... "don't let it die" .... first hundred in real money, if you're a beginner, you'll get away with it... even with less leverage...

if you're in a difficult financial situation, don't even try... You may be three more years away from moving in... :-)))

To start making money here, you'll have to lose a few hundred... :-)))

It's easier to go to an underground casino, it's either yes or no... :-)))

Subscription is when, roughly speaking, someone who you think is successful trades for you ... :-)))

credits are the same quid...

I traded on the demo and it worked just tell me how to set the Expert Advisor credits the same quid it is also clear as with the payment immediately or after
 

Hello, I can't get the Expert Advisor to comply with the condition that it should not open a position for some time after the stop. I tried to calculate the closing time of the last order:

for (int i=OrdersTotal()-1; i>=0; i--)
  {
  OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
  if (OrderProfit()<=0)datetime LastOrderTime = OrderCloseTime();
  }

and then added it to the condition of opening a position:

if (... &&... && TimeCurrent() - LastOrderTime > 600)

but it didn't work and I don't know any other way... Please help!

 
MeatShake:

Hello, I can't get the Expert Advisor to comply with the condition that it should not open a position for some time after the stop. I tried to calculate the closing time of the last order:

and then added it to the condition of position opening:

but it didn't work and I don't know any other way... Please help!


 for (i=0; i<OrdersHistoryTotal(); i++) 
    {
    if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
       {
       //..............
       //..............
       }
    }
 

I want to make a defence against uncontrolled losses. There will be conditions under which the EA must stop so that I can only switch the EA on again manually from the platform. It would be it would be nice if it could be done as extern bool and after deactivating it would bepossible in the inputswindow wouldchange "false" to "true" and expert would be enabled again .Any suggestions on how to do something like that?

 
abeiks:

I want to make protection against uncontrolled losses. There will be conditions under which the EA must stop so that I can only switch the EA on again manually from the platform. It would be it would be nice if it could be done as extern bool and after deactivating it would bepossible in the inputswindow wouldchange "false" to "true" and expert would be enabled again .Any suggestions on how to do something like that?


Better via GlobalVariableSet. extern bool can get lost.
 
abeiks:

I want to make protection against uncontrolled losses. There will be conditions under which the EA must stop so that I can only switch the EA on again manually from the platform. It would be it would be nice if it could be done as extern bool and after deactivating it would bepossible in the inputswindow wouldchange "false" to "true" and expert would be enabled again .Any suggestions on how to do something like that?


Create a graphical object on the chart. If there is an object with a certain name, then exit at the beginning of the OnStart() function. To unlock it, delete the object manually.
 
evillive:

GlobalVariableSet is better. extern bool can get lost.

Thank you!
 
Integer:

Create a graphical object on the chart. If there is an object with a certain name, then exit at the beginning of OnStart(). To unlock it, delete the object manually.

Thank you!

And, how do we exit? return(0); shows me an error.