[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 476

 
Elektronik:

Thanks, but I still don't see a description :(

A description of what? What do you mean by description? It's all there.

Description of functions in the header file. Examples of use in a test script.

 
Zhunko:

A description of what? What do you mean by description? It's all there.

Description of functions in the header file. Examples of use in the test script.


Sorry, saw it. saw it.
 

Hello. Please help me fix the EA code. The problem in the code is as follows: if the price > or = prescribed levels then a trade opens. The price can be as much as it wants > these levels, respectively, the EA opens a bunch of trades.

I want toremove the symbol">"from the code and leave only"=". I myself remove the symbol ">" but I get a lot of errors when compiling.HELP ME.

 
// < 0 - Dn
// > 0 - Up
int Signal()
{
double RSI = iRSI(NULL,15,RSIperiod,RSI_price,SignalBar);
double Stoch = iStochastic(NULL,15,Stoch_K,Stoch_D,Stoch_slowing,Stoch_method,Stoch_price,Stoch_mode,SignalBar);
double CCI = iCCI(NULL,15,CCI_period,CCI_price,SignalBar);

double MA2 = iMA(NULL,15,ma2_period,ma2_shift,ma2_method,ma2_price,SignalBar);
double IchiA = iIchimoku(NULL, 15, tenkan, kijun, senkou_span_b, 3, SignalBar);
double IchiB = iIchimoku(NULL, 15, tenkan, kijun, senkou_span_b, 4, SignalBar); 

    if(GO && SignalType_1 && RSI >= 65 && Stoch >= 80 && CCI >= 100) {GO=false; return(+1);}//запретить повторный вход (+1);
    if(GO && SignalType_2 && Bid >= MA2 && RSI >= 65 && Stoch >= 80 && CCI>=100) {GO=false; return(+1);}//запретить повторный вход return(+1);
    if(GO && SignalType_3 && Bid >= IchiA && RSI >= 65 && Stoch >= 80 && CCI>=100) {GO=false; return(+1);}//запретить повторный вход (+1);
    
   
    
    if(GO && SignalType_1 && RSI <= 35 && Stoch <= 20 && CCI <= -100) {GO=false; return(-1);}//запретить повторный вход (-1);
    if(GO && SignalType_2 && Ask <= MA2 && RSI <= 35 && Stoch <= 20 && CCI <= -100) {GO=false; return(-1);}//запретить повторный вход (-1);
    if(GO && SignalType_3 && Ask <= IchiB && RSI <= 35 && Stoch <= 20&& CCI <= -100) {GO=false; return(-1);}//запретить повторный вход (-1);
    
    if(OrdersTotal()==0)GO=true;
    
    return(0);
}


This is part of the code if you need the entire code, I will post it.

Thanks in advance.
 

Put a line before the condition check

if(OrdersTotal()> 0)return(0);

I've looked again and realized that the code is not yours and you have no idea how to fix it. You already have everything in your code, look for the place where it places orders and why it ignores the GO variable.

 
Roger:

Put a line before the condition check

if(OrdersTotal()>0)return(0);

Looked again, I understood - the code is not yours and you have no idea how to fix it. You already have everything in your code, look for the place where it places orders and why it ignores the GO variable.

The code isn't mine but was written for me according to my tech assignment and I have no idea how to fix it that's why I addressed it. Thanks for the reply
 

Good afternoon.

Can you tell me please (in a private message) where the quotes are on weekends?

 

Hi all! Need some help. I don't know where the error is!

The point is this. We set the reference point in time, let's say 29/10/2012 00:00. Create an array and put the values in it from the starting point to the present moment. Then check for those conditions of price deviations that I set. If we reach deviation ==10. We display a message and shift the point from the one we set earlier to 2 days ahead. And repeat the procedure. The problem is the following array should be constantly replenished, let's say from a point 29/10/2012 00:00 we have not enough values and every new formed minute bar should be placed in it and checked and the reference point is not shifted until the conditions coincide ==10 times. But for some reason at every tick, it starts counting values again from the starting point!!!!

Help solve the issue! THANKS EVERYONE FOR YOUR HELP!!!

//-----------------------------------------------------------------------------------------------------------------------------------
datetime Tochka_History = D'2012.10.10 17:30';           
double d[];                                            
double a;                                                 
int i;                                                   
int r=0;                                                 
int j=0;                                                  
int c=0;                                                    
datetime time;                                              
int bars;                                                   
string l;
//-----------------------------------------------------------------------------------------------------------------------------------
int start(){
if(j==0){
l=TimeToStr(Tochka_History,TIME_DATE|TIME_MINUTES);
Alert("Точка отсчета - ",l,"; Счетчик c - ",c);                                                                          
if(TimeCurrent()>=Tochka_History){                                                                                   
bars=iBarShift(NULL,PERIOD_M1,Tochka_History,false);                                                                 
time=iTime(NULL,PERIOD_M1,i);                                                                                                                                            
ArrayResize(d,bars);                                                                                                 
for(i=bars;i>0;i--) d[i]=(iHigh(NULL,PERIOD_M1,i)+iLow(NULL,PERIOD_M1,i))/2;                                        
for(i=bars;i>0;i--) Uslovie();}}}                                                                                     
//-----------------------------------------------------------------------------------------------------------------------------------
void Uslovie(){
if(r==0){a=d[i];r=1;}
if(a+10*Point<=d[i] && r==1){r=0; c=c+1; Alert("Счетчик c - ",c);}
if(c==10){Alert("Значение С достигло 10"); j=1; Smeshenie();}}
//-----------------------------------------------------------------------------------------------------------------------------------
void Smeshenie(){
Tochka_History=Tochka_History+2*24*60*60;
l=TimeToStr(Tochka_History,TIME_DATE|TIME_MINUTES);
Alert("Новая точка отсчета времени - ",l);
if(TimeDayOfWeek(Tochka_History)==6||TimeDayOfWeek(Tochka_History)==0){
Tochka_History=Tochka_History+1*24*60*60;
l=TimeToStr(Tochka_History,TIME_DATE|TIME_MINUTES);
Alert("Новая точка отсчета времени, если выпали выходные - ",l);} j=0;}
//-----------------------------------------------------------------------------------------------------------------------------------
 
merkulov.artem:

Hi all! Need some help. I don't know where the error is!

The point is this. We set the reference point in time, let's say 29/10/2012 00:00. Create an array and put the values in it from the starting point to the present moment. Then check for those conditions of price deviations that I set. If we reach deviation ==10. We display a message and shift the point from the one we set earlier to 2 days ahead. And repeat the procedure. The problem is the following array should be constantly replenished, let's say from a point 29/10/2012 00:00 we have not enough values and every new formed minute bar should be placed in it and checked and the reference point is not shifted until the conditions coincide ==10 times. But for some reason it starts counting the values anew from the starting point at every tick!!!

Help me solve this problem! THANK YOU ALL FOR YOUR HELP!

The third time I see your request and no one react, why do you think so? Probably people just do not understand what is wanted from them.

If we reach deviations ==10. We display a message and move the point from the one we set earlier by 2 days.....But for some reason it starts recalculating values from the starting point at every tick!!!

That's because your code doesn't check where it starts from. So it starts each time from the starting point. Check with your printer if there is a deviation of 10 and if it really shifts the point by 2 days. If it is shifted by 10 and the waypoint is shifted by 2 days, then before entering the next tick it is necessary to check, if it is really necessary to enter the start point or it is already entered.

You have a complicated way of getting at the truth. I'm sure if you formulate the problem itself, it will tell you a simpler way of solving it.

P.S.

Of all solutions to a problem, the easiest one is always the hardest to find, because in order to find it you have to recycle and sift through a heap of junk. So, feel free to formulate - simple solution doesn't mean quick solution. Maybe people here will save you more than a day of your life.

 

Good day!!! Super duper awesome question. How do I stop the tester when it reaches the right place in the code? I don't see anything like that in the help. It can not be that at all, and the function would be valuable!

2. The behavior of the iCustom function. In reality, the function always produces a print -1 (except when a buffer corners of the zigzag). But in the tester all see 0. Why such a difference?

double strela1 = iCustom(NULL, taymfreym, "индикатор", 2, 1);
            double strela2 = iCustom(NULL, taymfreym, "индикатор", 3, 1);
            
            int BUY=0,SELL=0;int ticket; 
            Print (  " strela1 " , strela1 , "   strela2  " , strela2 );


 
Dimka-novitsek:
Good day!!! Super duper awesome question. How do I stop the tester when it reaches the right place in the code? I don't see anything like that in the help. It can not be that at all, and the function would be valuable!

send him a press of the "Pause/Break" button

search for an article on how to send it.

Reason: