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

 
FoxUA:


In order to avoid further clarification. FoxUA create your own thread with a question in which you disclose all the intricacies. "Any newbie question..." is a topic for "quick" "Q&A".
 
DDFedor:

In order to avoid any further clarifications. FoxUA, create your own thread with a question, where you disclose all the details. "Any newbie question..." is a topic for "quick questions and answers".

I'm not checking attitudes, I'm commenting on a statement I made to myself,

I'm not talking about quick, I'm talking about meaningless comments that don't help.

 
FoxUA:

Andrey, you got confused, I looked at the code, your HaveBuyLimitOrderEnd variable occurs only in this construction:

  if (HaveBuyLimitOrderEnd== true) 
  {DeleteOrder();  // Выбираем            
  }}

And several posts above you write it in this one:

The whole point is that the first value works fine, but this one won't.

if(HaveBuyLimitOrderEnd== true)
{ModifyBuyStopOrder(PRAskS); // Check it
} }

How should it be?

 
ToLik_SRGV:

Andrey, you got confused, I looked at the code, your HaveBuyLimitOrderEnd variable occurs only in this construction:

And several posts above you write it in this one:

Is this how it should be?



it is, here's the logical part, to put it face to face there blocks are procically the same difference in terms

if(bs==1&&bl==1)
{OpenBuyLimitOrder(Lot*7,PRAskL); 
  if (HaveBuyStopOrder== true) 
  ModifyBuyStopOrder(PRAskS);  // Выбираем            
      
  }   

if(bt==1&&bl==1) 
{OpenBuyStopOrder(Lot,PRBidS);
   if (HaveBuyLimitOrder== true) 
  ModifyBuyLimitOrder(PRAskL);  // Выбираем            
  } 

if(ss==1&&sl==1)
{OpenSellLimitOrder(Lot*7,PRBidL); 
   if (HaveSellStopOrder== true) 
  ModifySellStopOrder(PRBidS);  // Выбираем            
  } 

if(st==1&&sl==1)
{OpenSellStopOrder(Lot,PRBidS); 
  if (HaveSellLimitOrder== true) 
  ModifySellLimitOrder(PRBidL);  // Выбираем            
  } 

  if(bs==1&&bl==3)
{OpenBuyLimitOrderEnd(Lot*15,PRAskL); 
   if (HaveBuyStopOrder== true) 
  ModifyBuyStopOrder(PRAskS);  // Выбираем            
  } 

if(bt==1&&bl==3) 
{OpenBuyStopOrder(Lot,PRBidS);
OpenBuyLimitOrder(Lot*3,PRAskL);
  if (HaveBuyLimitOrder== true) 
  DeleteOrder();  // Выбираем            
  } 

if(ss==1&&sl==3)
{OpenSellLimitOrderEnd(Lot*15,PRBidL); 
   if (HaveSellStopOrder== true) 
  ModifySellStopOrder(PRBidS);  // Выбираем            
  } 

if(st==1&&sl==3)
{OpenSellStopOrder(Lot,PRBidS);
OpenSellLimitOrder(Lot*3,PRBidL);
   if (HaveSellLimitOrder== true) 
  DeleteOrder();  // Выбираем            
  } 

   if(bs==1&&bl==7)
{
    if (HaveBuyStopOrder== true) 
  ModifyBuyStopOrder(PRAskS);  // Выбираем            
  } 

if(bt==1&&bl==7) 
{OpenBuyStopOrder(Lot,PRBidS);
OpenBuyLimitOrder(Lot*3,PRAskL); 
  if (HaveBuyLimitOrderEnd== true) 
  DeleteOrder();  // Выбираем            
  } 

if(ss==1&&sl==7)
{  if (HaveSellStopOrder== true) 
  ModifySellStopOrder(PRBidS);  // Выбираем            
  } 

if(st==1&&sl==7)
{OpenSellStopOrder(Lot,PRBidS); 
OpenSellLimitOrder(Lot*3,PRBidL); 
  if (HaveSellLimitOrderEnd== true) 
  DeleteOrder();  // Выбираем            
  } 

so any block sounds the same "if the first variable is 1 and the second variable is 1,3,7 then open a pending order with the lot ____ and the price _____" and also if the flag of the selected open pending order is equal to the truth then modify (delete) this order

 
Hello. The situation is as follows: an indicator shift value from the buffer is searched by the for statement, i.e. for(i=0;i<=100;i++), MD1=MD1+i, MD1=iMACD(........, i), the position is opened only if the latest bar (in this case the 100th) meets the opening criteria. I need it to open in the direction of 0 bars (if the criteria are correct) and not to consider later bars. Is there a solution to this problem? Thanks in advance.
 
probably for(i=100;i>=0;i--), ?
 
sergeev:
probably for(i=100;i>=0;i--), ?
So, for some reason orders are not opening at all (MD1=MD1-i changed).
 

Hello all, I was advised to simplify the Soviet, I started to simplify it, but I have a problem, the essence of the problem when you open orders in the journal writes error 4107 but it easily opens all orders, who can look at what the problem, I say at once all the code is taken from the library Kim Igor V. aka KimIV,

Files:
test_21.mq4  15 kb
 
sergeev:
probably for(i=100;i>=0;i--), ?
Seems to work, only i>=2, if 0 or 1, it returns -1 and 0 respectively. Thanks.
 
FoxUA:

Hello all, I was advised to simplify the Soviet, I started to simplify it, but I have a problem, the essence of the problem when you open orders in the journal writes error 4107 but it easily opens all orders, who can look at what the problem, I say at once all the code is taken from library Kim Igor V. aka KimIV,

Normalize the stop prices.
Reason: