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

 

hello everyone!

I did some digging and couldn't find it, so I'm going to ask some knowledgeable people...

is it possible to get information about the maximum total number of open and pending orders allowed by a broker?

I searched in MarketInfo, but there is nothing similar... or this information is not broadcasted through the terminal?

 

Trying to write an EA I wrote the first lines I borrowed from other EAs Error during compilation

Please help


  • Open two identical orders
  • Buy - MA2 crosses MA19 from below to above MACD>0
  • Sell - МА2 crosses МА19 from the top to the bottom МАCD< 0
  • The first order is closed by TP=20pip . At the same time the second order gets SL equal to the first order closing price
  • The second order is closed by TrailingStop
Files:
andriaus.mq4  6 kb
 
I often see such a parameter in EAs as Slippage. What is it for and what does it do?
 
Shniperson >> :
I often see such parameter in Expert Advisors as Slippage. What is it for?

The maximum allowable slippage in pips not in favour of the trader when making a trade (opening or closing a position) in the market. If slippage exceeds the specified limit, the trade will not be executed - requotes.


It is not used always and not by all brokerage companies - please refer to your broker's manual.

 
And another dumbest question... What is the difference between ByLimit and ByStop? (similar to Sell)
 

Hello, can someone tell me how can I request the state of the indicator buffer on the previous bar from an EA? If it is an arrow and fills the buffer like this:

if (sigCurrent==1 && sigPrevious==2)
{
ExtMapBuffer4[i-1] = High[i-1]-5*Point;
//ExtMapBuffer3[i] = Ask;
entry=true;
entry_point=Ask;
}
else if (sigCurrent==2 && sigPrevious==1)
{
ExtMapBuffer3[i-1] = Low[i-1]-5*Point;
//ExtMapBuffer4[i] = Bid;
entry=true;
entry_point=Bid;

}


In my opinion, the Expert Advisor needs conditions matching, somewhere like this:

double Up;
double Down;
int res;

Up=iCustom(NULL, 0, "sidus_v.2", 3, 1);
Down=iCustom(NULL,0, "sidus_v.2",2,1);
//---- sell conditions
if(Down==Low)
{
res=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,"",MAGICMA,0,Red);
return;
}
//---- buy conditions
if(Up==High)
{
res=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,",MAGICMA,0,Blue);
return;
}

But this is wrong!!

Please advise how to deal with this case...

 
granit77 >> :

If traffic is critical to you, the most effective way is to limit the number of characters used in the Market Watch window.

Thank you

 
Shniperson >> :
And one more dumbest question . What is the difference between a BuyLimit and a ByStop? (Similar to Sell order)
  • Buy Limit - to open a Buy position if Ask becomes lower or equal to the order price. The current price level at the moment of order installation is higher than the value of Buy Limit order;

  • Buy Stop - open a Buy position if Ask becomes higher or equal to the order price. In this case current price level at the moment of placing the order is lower than Buy Stop order value;

 
WalkMan >> :
  • Buy Limit - to open a Buy position if Ask becomes lower or equal to the order price. The current price level at the moment of order installation is higher than the value of Buy Limit order;

  • Buy Stop - open a Buy position if Ask becomes higher or equal to the order price. In this case current price level at the moment of placing the order is lower than Buy Stop order value;

Roughly speaking, Buy Limit is a reversal order, while Buy Stop is a breakout order.

 
Can someone please tell me how to register an EA in ex4 format in MT4?
Reason: