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

 

I agree, it's all about getting out in time.

I got so drunk in an operating theatre about 15 years ago...

 
zoritch:
Why open? ... :-))) if you close properly, any opening will do... :-)))


I want to guess the gap. Evra will bounce. if not - throw me stones....... at 1.359000000000.....
 
Vinin:


All you need to do is russify the meta-editor itself

View - Languages-Russian

But still, pointing at the buttons shows "gibberish"!
 
Roger:


For those who are in the tank - the variable Bars stores the number of bars on the chart, with each new bar, if it does not exceed the maximum number of bars on the chart, the variable is incremented by one.

All other variables on the chart (Close, Open, etc.) use the number of bars as a pointer in their array,

And I have exactly the same understanding.

That is, the value of Bars increases by 1 unit at each new candle.

The Bars value in this code (below) increases by 1 unit at each candle (according to the log of the Print function value).

int start()  
{
int  pY  =  Bars;
Print ( "Н Н Н  =  ",pY);   
}

And in this code (below), there are two variables where the Bars values should be saved.

int start()  
 {
int pY =  Bars;
int pY1 = Bars+239;
       
Print( "Н Н Н  =  ", pY);   
Print( "НH HН НH  =  ", pY1); 

}

Due to the fact that the number of variables has increased by 1 unit - both variables Bars change their values NOT EVERYWHERE (according to the log of the Print function value).

And it is a mistake to think that I want to write the value of a non-existing candle into pY1. pY+239 is written into this variable.

 
solnce600:


WHY because the number of variables has increased by 1 unit - both variables Bars change their values NOT EVERY candle (according to the Print function log value).

And it is a mistake to think that I want to write the value of a non-existing candle into pY1. pY+239 is written into this variable.



Why not on every candle? On a five-minute chart, a new bar appears every five minutes, not every minute,
 
Roger:


Why not on every one? On a 5 minute chart a new bar appears every 5 minutes, not every minute,

HERE IS THE LOG FOR THE CODE WITH TWO VARIABLES

2014.01.20 00:05:26 2000.02.29 01:15 BASE 30-150 EURUSD,M5: NN NN = 11897

2014.01.20 00:05:26 2000.02.29 01:15 BASE 30-150 EURUSD,M5: NN = 11658
2014.01.20 00:05:26 2000.02.29 01:15 BASE 30-150 EURUSD,M5: NN NN = 11897
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN NN = 2411
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN NN = 2411
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN NN = 2411
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:26 BASE 30-150 EURUSD,M5: NN NN = 2411
 
Jnrsolnce600:

HERE IS THE LOG AS APPLIED TO CODE WITH TWO VARIABLES


Open the tester log for today, not the log. It is in the \tester\logs\ folder.
 
solnce600:

HERE IS THE LOG FOR THE CODE WITH TWO VARIABLES

2014.01.20 00:05:26 2000.02.29 01:15 BASE 30-150 EURUSD,M5: NN NN = 11897

2014.01.20 00:05:26 2000.02.29 01:15 BASE 30-150 EURUSD,M5: NN = 11658
2014.01.20 00:05:26 2000.02.29 01:15 BASE 30-150 EURUSD,M5: NN NN = 11897
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN N = 8743
2014.01.20 00:05:25 2000.02.14 15:18 BASE 30-150 EURUSD,M5: NN NN = 8982
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN NN = 2411
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN NN = 2411
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN NN = 2411
2014.01.20 00:05:24 2000.01.12 15:27 BASE 30-150 EURUSD,M5: NN N = 2172
2014.01.20 00:05:24 2000.01.12 15:26 BASE 30-150 EURUSD,M5: NN NN = 2411

Your code is a special secret, or are you too lazy to post it?

The error is in it, not in the environment, imho.

 

I can't figure out what my mistake is again

 if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES)==false)
 {

 active=true;
 }
 //открывать сделку или не открывать сделку
 
 if(active==true)
 {
 if((high3>high2)&&(close2<close1)&&(low2<low3)&&(open1<close2)&&(close1>close2)&&(low1<low2))
{
b=high2;
now=Open[0] ;
}
if(iOpen(NULL,0,0)>b&&CheckLastOrderTime(Symbol(),0,1)<now).....вот на этом моменте мы проверяем время закрытия ордера последнего с открытием бара на котором стало понятно что появились условия
{.....таким образом у нас не должно быть повторных входов так как если сформируются условия для покупки и закрытие сделки произойдет за этими условиями тоесть время закр ордера будет в любом случае больше
время формирования новых условий то мы не должны вести торговлю а оно открывает позы да и зараза ещо на одном баре иногда что противоречит условию по времени открытия и закрытия позы
 OrderSend(Symbol(),OP_BUY,0.1,Ask,0,Ask-30*Point,Ask+90*Point,0,0,0,Green);
 active=false;
}
} 
 
Zver4991:

I can't figure out what my mistake is again

I don't want to. I don't want to until you tell me in Russian what the problem is.
Reason: