[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 412

 
Hello, could you please help me write some code to make the program work with a micro lot?
Files:
eurox2_1.ex4  10 kb
 
costy_:

Read the code several times until it's clear what's written, and you'll be happy.

why do you need flags?) you can do without them


Instead of check_us1, check_us2 and check_us3 what variables or conditions should be set, I don't understand...?
 
costy_:

Still don't get it.

It's probably easier to explain in a picture.

Yes, thank you! Where you have it highlighted in blue you need to find the candle that closed above the high on D1.

P.S. I'll ask again, as we slipped past there somehow.

 
LOA:


Yes, the indicator on history works with any invoked ind. does not work in real life, checked on M1.

if I understood you correctly, I will try to replace in the conditions >0, <0 with ==1 or ==-1.

It works for me, line time setting ind.

int to double replace when calling ind.

or give me ex4 indicators to work (may be there is something in them?!)

 
kolyango:

Instead of check_us1, check_us2 and check_us3 what variables or conditions should be set, I don't understand...?
bool проверять_ус1=true;
bool проверять_ус2=true;
bool проверять_ус3=true;
void start(){
      if(проверять_ус1)
         if(Open[0]>Close[1]){//условие 1
            проверять_ус1=false; //заглушка
         }
      if(проверять_ус2)
         if(Open[0]<Close[2]){//условие 1
            проверять_ус2=false; //заглушка
         }
      if(проверять_ус3)
         if(Open[0]==Close[3]){//условие 1
            проверять_ус3=false; //заглушка
         }
      if(!проверять_ус1&&!проверять_ус2&&!проверять_ус3){
            проверять_ус1=true;
            проверять_ус2=true;
            проверять_ус3=true;      
      }
}

Read the code several times until it's clear what's written, and you'll be happy.


if(Open[0]>Close[1]){//условие 1

 
costy_:

Read the code several times until it is clear what is written, and you will be happy.



What should I put here?

if(проверять_ус1)
 
001:

Yes, thank you! Where you have it highlighted in blue you need to find the candle that closed above the high on D1.

P.S. I'll ask again, as we have somehow slipped past there.

I thought it was pretty clear.

     double предыдущий_хай_день=iHigh(0,1440,1+iBarShift(0,1440,Time[0]));
     Alert(предыдущий_хай_день);
     for(int i=iBarShift(0,0,iTime(0,1440,iBarShift(0,1440,Time[0])));i>=0;i--)
      if(Close[i]>предыдущий_хай_день)
      Alert("Close[i]>предыдущий_хай_день см. по времени "+TimeToStr(Time[i]));
         return;
 
kolyango:


What should we put here?

bool проверять_ус1=true;
bool проверять_ус2=true;
bool проверять_ус3=true;
void start(){
      if(проверять_ус1)
         if(ююююююююююююююл){//условие 1
            проверять_ус1=false; //заглушка
         }
      if(проверять_ус2)
         if(ыаыаыаыаыаыаы){//условие 2
            проверять_ус2=false; //заглушка
         }
      if(проверять_ус3)
         if(ыаыпрерногггггггггггггг){//условие 3
            проверять_ус3=false; //заглушка
         }
      if(!проверять_ус1&&!проверять_ус2&&!проверять_ус3){
            проверять_ус1=true;
            проверять_ус2=true;
            проверять_ус3=true;      
      }
}

nothing (work : a positive half-wave came in, if (if) check_us1==true, check further if (if) yyyyyyul==true,(oppen>slope assuming) then prohibit on the next half-wave check condition 1 yyyyyul==true)

The condition is your condition.

 
costy_:
yyyyyuuuuuuuul is your condition


I understand that condition, but instead of check_us1, check_us2 and check_us3 what should be put?

bool Val_max = true;
bool Cl_dn = true;
bool Val_min = true;
void start()
  {
      if(???????)
         if(ююююююююююююююл)
         {                                 //условие 1
          Val_max=false;                   //заглушка
         }
      if(???????)
         if(ююююююююююююююл)
         {                                 //условие 2
          Cl_dn=false;                     //заглушка
         }
      if(???????)
         if(ююююююююююююююл)
         {                                 //условие 3
          Val_min=false;              //заглушка
         }
      if(! ??? &&! ??? &&! ???)
         {
          ???????=true;
          ???????=true;
          ???????=true;      
         }
  }
 
OlegArH 07.12.2011 18:29

Good afternoon, friends!

I've got the idea of writing an EA, but my knowledge is woefully lacking.

I don't understand how to set pending order opening for time (i.e. with specified expiry date of pending order in case of non-execution).

If you don't mind, please give me an example of a program which opens a BS order at 50 pips from the current price with SL=50 TP=100 for 120 minutes to get a 100% understanding of it.

That is, such a body, which, if compiled, would simply open one by one orders with the specified parameters at the specified time and distance from the current price, at any timeframe, for any currency pair, and that is all.

To all of you, thank you very much in advance for support!