[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 861

 
Infinity:

it's strange,... i think i read somewhere on the forum in some top long time ago, the experience of running the EA on a real account, and there were problems with the frequency of quotes request to change the stop or something,... the end result is unfortunate
If you want to trade robots with the real EA, you'll need to add them to the strategy and they will get banned in any case.
 
vasya_vasya:
In this case the reason is not in the advisor, but in the strategy, it is useless to add anything, they will be banned in any case
I don't know why they say it's allowed to use EAs ?
 
Infinity:
In any case they will get banned, hmmm (( why do they write the use of EAs as possible/allowed? to get banned or something.
This is a woman's logic. I specifically said - if you request quotes a lot of times, then you will get banned no matter what.
 
vasya_vasya:
I said, specifically - if you ask for quotes very many times, then you will be banned no matter what.

Well, I asked for help specifically in this degree, what to add to the code so that such and similar errors don't happen.
 
Infinity:

Well, I specifically asked for help in this degree, what should be added to the code, so that such and similar errors don't happen.
Without knowing the code, I can only say that by adding a slip at 3 minutes after the order is sent, this can be avoided
 
vasya_vasya:
Without knowing the code, I can only say that adding a slip at 3 minutes after an order has been sent will avoid this

so i got the 3 min slip (took note), .... i>- well, the code also has order pending (placed once a day with EA startup), and trawl with step, and close,... nothing more )) such a gentleman's kit) the code is simple, with simple conditions close open etc. nothing wise.
 
Infinity:

so i understand the 3 minute slip (took note),.... i have a code with pending orders (put them once a day with EA startup), and trawl with step, and close... there's nothing else)) such a gentleman's set) the code is simple, with simple conditions to close, open, etc. nothing too wise.
Why are you bothering? Between opening and closing positions there must be a sufficient lapse of time, in my opinion not less than three minutes (fighting with scalping). Opening the opposite position to the one opened earlier than the same three minutes may also be considered by Decsels as a way to bypass their restrictions on keeping time of position in the market. Well, don't make modifications frequently, at least in 5 increments (for trawl) to avoid sending requests on every tick. The devil is not as awful as you might think. :)
 
FOReignEXchange:

No time, sorry. If pre-presetting is needed on history, not just on-line, you need to enter the i parameter instead of zero.

You'll need to think about it there.

extern int  timedraw=1;
datetime t=0;



int init()
  {
   t=0;
   return(0);
  }



int start()
  {
    if (TimeCurrent()-t < timedraw*60) return(0);
    
    t=TimeCurrent();
    Print("Время запуска = ",TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS));
...........
 
IgorM:

int t,N;


int start()
    {


if (t==0) t=iTime(NULL,1,0);

if (iBarShift(NULL,1,t)>=5)
   {
   N=iBarShift(NULL,1,t);
   Alert("Прошло '",N, "' минут, перерисовываемся");
   t=0;
   Также обнуляем необходимые параметры, которые использует индикатор, чтобы он смог сделать перерасчёт.
   }


    }

You wanted five minutes, didn't you?

This is how it should work. Every 5 minutes there will be a re-run if you reset the required parameters that the indicator uses.

 

Except that sometimes there are no ticks for three minutes, like now. Looking at GBPUSD M1 chart, there were no 3-4 minute ticks there. You cannot use TimeCurrent() on history. Or you cannot use it in the tester because it is the current time and it does not change.

Based on the code above, we can say that the message signal will not be every 5 minutes, but every 5 bars on the minutes.

Reason: