Help with this, simple as it is i need advise. How can i organise this ? Advise appreciated.

 

double valueA;

double valueB; 

double valueC; 

valueA=0.04;

valueB=-0.02;

valueC=0.02; 

double CurrMinPrev=iHigh(NULL,PERIOD_H1,0)-iLow(NULL,PERIOD_H1,10) 

if(CurrMinPrev> valueA)     //   if this condition is met     

 

double CurrMinPrevB=iHigh(NULL,PERIOD_M1,0)-iLow( NULL,PERIOD_M1,6)

 if(CurrMinusPrevB<valueB)// as long as the above condition is met(CurrMinPrev>valueA) then here OP_SELL  takes place.

  if(CurrMinusPrevB>valueC)// as long the above condition is met(CurrMinPrev>valueA) then here OP_BUY takes place.                                   

 

  1. For large amounts of code, attach it
  2. You need to state a problem.
  3. You need code that compliles
  4. Since there are no slaves here, you have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem.
 
WHRoeder:

  1. For large amounts of code, attach it
  2. You need to state a problem.
  3. You need code that compliles
  4. Since there are no slaves here, you have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem.

1. iam not ready to expose the whole of my EA.

2.i just stated the problem. what else is needed.

3.There are human experts (not terminators) sure they understand without compilation.

4.There are no slaves here!!! I am not enslaving anyone. I have this forum as a choice don't try to shut me out.I never said code it for me.I said help me and with the nature of my problem.

YOU KNOW WHAT? I DON'T GET YOU AND YOUR INTENTIONS IN SAYING THIS TO ME!!! 

 
petertrov:

1. iam not ready to expose the whole of my EA.

2.i just stated the problem. what else is needed.

3.There are human experts (not terminators) sure they understand without compilation.

4.There are no slaves here!!! I am not enslaving anyone. I have this forum as a choice don't try to shut me out.I never said code it for me.I said help me and with the nature of my problem.

You haven't stated what the problem is . ..  you just posted some code.  It makes things easier if you tell us rather than us having to guess . . . if I were to guess . . .

double valueA;

double valueB; 

double valueC; 

valueA=0.04;

valueB=-0.02;

valueC=0.02; 

double CurrMinPrev=iHigh(NULL,PERIOD_H1,0)-iLow(NULL,PERIOD_H1,10) 

if(CurrMinPrev> valueA)     //   if this condition is met     
   {

   double CurrMinPrevB=iHigh(NULL,PERIOD_M1,0)-iLow( NULL,PERIOD_M1,6)

   if(CurrMinusPrevB<valueB)// as long as the above condition is met(CurrMinPrev>valueA) then here OP_SELL  takes place.
      {
      //  code to place OP_SELL  + Error checking and reporting, very important ! !
      }

  if(CurrMinusPrevB>valueC)// as long the above condition is met(CurrMinPrev>valueA) then here OP_BUY takes place.    
      {
      //  code to place OP_BUY  + Error checking and reporting, very important ! !
      }
  }
 
RaptorUK:

You haven't stated what the problem is . ..  you just posted some code.  It makes things easier if you tell us rather than us having to guess . . . if I were to guess . . .

RaptorUk. Let me explain. While (CurrMinPrev>valueA) is true.

  (CurrMinPrevB<C) condition occurs then OP_SELL is executed

the same if (CurrMinPrevB>valueC) condition occur then OP_BUY is executed.

i want the (CurrMinPrev>valueA) outside the OP_BUY or OP_SELL condition, but controlling thereof.But then if its true orders are opened. How can this be done. 

 i dont want code like this:     if(CurrMinPrev>valueA){    

                                            if (CurrMinPrevB <valueC){

                                                    then open an order(OP_SELL) 

 
petertrov:

RaptorUk. Let me explain. While (CurrMinPrev>valueA) is true.

  (CurrMinPrevB<C) condition occurs then OP_SELL is executed

the same if (CurrMinPrevB>valueC) condition occur then OP_BUY is executed.

i want the (CurrMinPrev>valueA) outside the OP_BUY or OP_SELL condition, but controlling thereof.But then if its true orders are opened. How can this be done. 

That is exactly what the code I have posted will do . . .  if you don't think it will then please explain why not . . .
 
RaptorUK:
That is exactly what the code I have posted will do . . .  if you don't think it will then please explain why not . . .
Thanks RaptorUk i didn't even perceive. Now i see. Again thank you Sir.
Reason: