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

 
alsu писал(а) >>
int start(){
   static int nevtime=0;
   if ( nevtime==Time[0]) return(0);
   nevtime=Time[0];

// Ваш код

   return(0);
}
In this example, the first start will not start at the beginning of the bar. On all subsequent starts at the start of a new bar.
 

Here we go again, I put in any of these codes and I get this:

There are not enough trades! And it's not about the algorithm, the EA opens buy when the stochastic signal is below the bottom level, I want to save the EA from false signals of stochastic over-rimming, but how?

double Ind11=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_MAIN,0);
double Ind12=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_SIGNAL,0);

double Ind13=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_MAIN,1);
double Ind14=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_SIGNAL,1);



if(Ind11<20 && Ind11>Ind12 && Ind13<Ind14)
{

OrderSend(Symbol(),OP_BUY,Lots,Ask,1,0,0,"",16384,0,Green);

}

 
Summer >>:

ну вот опять, ставлю любой из этих кодов и получаеться вот это:

сделок не хватает! И тут не дело в алгоритме, советник открывает бай когда стахостик сигналет ниже нижнего уровня,хочу избавить советник от ложных сигналов перерисовки стахостика, но как?

double Ind11=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_MAIN,0);
double Ind12=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_SIGNAL,0);

double Ind13=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_MAIN,1);
double Ind14=iStochastic(NULL,0,Kperiod,Dperiod,slowing,MODE_SMA,0,MODE_SIGNAL,1);



if(Ind11<20 && Ind11>Ind12 && Ind13<Ind14)
{

OrderSend(Symbol(),OP_BUY,Lots,Ask,1,0,0,"",16384,0,Green);

}

in the stochastic you take 0 bar and when you set the above codes the program will only be executed at the very beginning of the bar, crossing can occur within 0 bar

 

sanyooooook, um... then how do you solve the redrawing problem without getting this defect or how do you change the trade opening algorithm to make it work?

added:

I tried to set it to work on closed bars, i.e. instead of 0 I put 1 - instead of 1 I put 2, but it still does not do all the signals, and does not do it in this case.


Files:
2.mq4  2 kb
 

Suppose there are several accounts of one brokerage company and, correspondingly, each account needs a separate terminal.

But the input quotes are the same for all of them and that only overloads the traffic.

Is there any program or a way to save on the input traffic, for example, is it possible to write some virual tool that would receive input traffic from the server and distribute it locally among the terminals? Of course, the output traffic should not be touched - it can be different.

 
How to convert from double to int, there is a number 0.0030, obtained by calculating the two price levels, I want to use in the trail, but I can not figure out how to get 0.0030 in an integer 30, by multiplying by 10000 an integer comes out 30, converted this way int x = 0.0030 * 10000; but trail does not see - x, maybe there is another way?
 

Anyway, a couple of seemingly silly questions...


1) What is shown on the price chart? Open or Close ? Or an average?


2) How do I fulfill the condition of intersection? The condition of comparison of two values leads to the opening of multiple orders, but we don't want to limit the opening roughly by time...


3) What type conversion functions there are e.g. IntToStr IntToReal, as in Delphi for example, here I have not found such...

 

sanyooooook писал(а) >>

if (Volume[0]>1)return;
добавить код в начало int start()

only works smoothly in the tester

 
alsu >>:

работает без сбоев только в тестере

Why only in the tester? It should work on both real and demo

 
sanyooooook >>:

почему только в тестере? работать должно и на реале и на дэмо

in a real fast market, the first tick is not necessarily 1

Reason: