I will write an advisor free of charge - page 128

 
Наджибулло Хабибов:

it does not work put 150 does not open

r=OrderSend(NULL,type,Lot(),NormalizeDouble(price,_Digits),Slip,sl,tp,"",Magic,0,clr);

What is the minimum level of stops provided by your broker? What is the minimum volume traded by your broker? Is there enough history to form an indicator?

 
VVT:

What is the minimum stop level provided by your broker? what is the minimum volume traded by your broker? is there enough history to form an indicator?

I have an Alpari broker you might know ,

 
VVT:

What is the minimum level of stops provided by your broker? What is the minimum volume traded by your broker? Is there enough history to form an indicator?

What is " Is there enough history to form an indicator? "

 
Наджибулло Хабибов:

what is it " Is there enough history to form an indicator? "

I see. If it works on currency then it's not the code, it's the inputs and settings when testing.

Set the parameters to 0.1 // lot, 500 // requotes, and run on no more than the last year period of history

 
VVT:

I see. If it works on currency then it's not about the code, it's about the inputs and settings when testing.

Set the parameters to 0.1 // lot, 500 // requotes, and run for no more than the last year of the history period

does not open all tried everything does not work

 
Наджибулло Хабибов:

It won't open. I've tried everything. It won't work.

OK, trying to get an error code, paste this

   //--- объявление и инициализация запроса и результата
   MqlTradeRequest request={0};
   MqlTradeResult  result={0};
   //--- отправка запроса
   if(!OrderSend(request,result))
      PrintFormat("OrderSend error %d",GetLastError());  // если отправить запрос не удалось, вывести код ошибки
   else 
      PrintFormat("OrderOpen error %d",GetLastError());  // если открыть не удалось, вывести код ошибки
   //--- информация об операции
   PrintFormat("retcode=%u  deal=%I64u  order=%I64u",result.retcode,result.deal,result.order);

before .

   return;
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int CountTrades()

Then compile the source file and repeat the test, you should get an error in the log, copy and paste it here, we will think about what to do next

 
VVT:

OK, trying to get an error code, paste this

in front of

After you compile the source file and repeat the test, you should get an error in the log, copy and paste here, we will think what to do next

I put the code like you said here are so many errors after compiling ,


	          
Files:
 
VVT:

OK, trying to get an error code, paste this

in front of

Then compile the source file and repeat the test, you should get an error in the log, copy and paste it here, we'll think about what to do next

after compiling, should i test in metadrader ? where in the logbook does the error appear in metaeditor ?
 

Hi all 👋. Need help in writing or looking for an EA. The advisor is basically simple, the essence is this: EVERY DAY (3 times a day) , at a certain time (opening of a new candle on M30) opens 2 transactions to bay and sell. Set a take and stop. It should also be possible to set trawl and transfer to the Boo. The settings should be approximately as follows (example).


1) First time:

- Opening time of two opposite orders : "00h 00m". (can be set manually)

- Bay :

TP : "...."

Sl: "...." .

Tral : "1" - is, "0" - is not, "trawl size".

Breakeven : "1"-translate, "2"-no-translate.

-Sell order : same as bay order.


2.Second time : "1" - active, "0" - not active.

Parameters for the orders are the same as in the First case.

3. third time. It is the same as the Second time.

For the second and third time it is obligatory to set the possibility of activation. Who can help????

 
Наджибулло Хабибов:

I put the code as you said here are so many errors after compiling ,


The idea was to add a function to the EA to get an error on your question.

A lot of errors in compilation, not only for me but for you as well, this is because the source code is not complete and making any changes and additions to the EA at this stage is not possible. You must either ask the author for full source code or restore the missing part of the code.

Unfortunately, I cannot help you with anything else.