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

 
AlekZZZandR >>:
А можно как-нибудь сделать чтобы индикатор iExposure.mq4 показывал данные на самом графике? а не в отдельном окне?

It can be implemented like this

Files:
 
Axmed >>:
Конкретезируйте пожалуйста, что значит "сделать как индикатор Volume" ??))

one scale only for High should be above zero (no need for Low), decreasing the value changes colour to red, increasing the value to green... would be much appreciated...

 
rasvet писал(а) >>

one scale only for High should be above zero (no need for Low), decreasing the value changes colour to red, increasing the value to green... would be much appreciated...


Like this?)

Files:
 
Axmed >>:


Примерно так?)

Thank you very much :))))

 
Please advise how to close several open orders at once and if you can explain in detail, I have not worked with scripts and expert advisors yet and do not know how to deal with them.
 
Anegener >>:
Здравствуйте.Подскажите как можно несколько открытых ордеров закрыть сразу.И если можно объясните поподробнее,со Скриптами и Советниками я ещё не работал и не знаю как с ними обходится.Заранее благодарю.

Here's a script. attach it to any chart - it closes all open orders.

Files:
 

why is there no bidding on silver and aud/usd?

 

Please help me to understand the code, I need an EA to update triggered pending orders. I just started to learn the language, I really hope the experts will help))

//+------------------------------------------------------------------+
//|                                               В одну сторону.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//---- input parameters
extern int       prof  = 50,
                 shift = 50,
                 stop  = 10000;
extern double    lot   = 0.1;
int tip;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
   OrderSend(Symbol(),OP_SELL,lot,Bid,3,
               NormalizeDouble(Ask + stop*Point,Digits),
               NormalizeDouble(Bid - prof*Point,Digits)," ",777,Blue);
   OrderSend(Symbol(), OP_SELLLIMIT,lot, 
               Ask+Point*shift, 0, Ask+Point*shift+Point*stop, 
               Ask+Point*shift-Point*(prof+2)); 
   OrderSend(Symbol(), OP_SELLLIMIT,lot, 
               Ask+Point*(shift*2), 0, Ask+Point*(shift*2)+Point*stop, 
               Ask+Point*(shift*2)-Point*(prof+2));            
   OrderSend(Symbol(), OP_SELLSTOP,lot, 
               Bid-Point*shift, 0, Bid-Point*shift+Point*stop, 
               Bid-Point*shift-Point*prof); 
                                                          
}
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
   {
   for (int i=3; i<OrdersTotal(); i++){   
      if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true){
         if (OrderSymbol()==Symbol()){
            tip = OrderType();
            lot = OrderLots();return;}}}
   
   if (tip==1)
               OrderSend(Symbol(), OP_SELLLIMIT,lot, 
               Ask+Point*shift, 0, Ask+Point*shift+Point*stop, 
               Ask+Point*shift-Point*prof);
   return(0);
}
//+------------------------------------------------------------------+
 

Hello, can you please help me correct the indicator to make it work on the zero bar, i.e. the arrow would disappear and appear on the last bar, and the alert only worked once, of course.

 
Please help.
Here is part of the code :

int Length = 20;
int LstBarClose = IndicatorCounted();
if (LstBarClose < 1) {
for (int ii = 1; ii <= Periodd; ii++) Bufer_4[Bars - ii] = 0;
for (ii = 1; ii <= Length; ii++) {
Bufer_1[Bars - ii] = 0;
Bufer_2[Bars - ii] = 0;
Bufer_3[Bars - ii] = 0;
}
}
if (LstBarClose > 0) LstBarClose--;
int difBr = Bars - LstBarClose;
for (ii = 0; ii < difBr; ii++) Bufer_4[ii] = 2.0 * iMA(NULL, 0, MathFloor(Length / 2), 0, MODE_LWMA, PRICE_CLOSE, ii) - iMA(NULL, 0, Length, 0, MODE_LWMA, PRICE_CLOSE, ii);
double AvW = iMAOnArray(Bufer_4, 0, MathFloor(MathSqrt(Length)), 0, MODE_LWMA, 0);
for (ii = 1; ii < difBr; ii++) {
double AvW2 = iMAOnArray(Bufer_4, 0, MathFloor(MathSqrt(Length)), 0, MODE_LWMA, ii);
}
1. I cannot figure out the difference between calculating variables AvW and AvW2.
I think AvW is clear - it is LWMA with period Length in Bufer_4 on the current bar.
But what is AvW2? Previous value of AvW, i.e. AvW[1] ????.
2. maybe someone can tell me how to write code to output Bufer_4 buffer value to a file.
Thank you.
Reason: