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

 

Help me program interpolation and extrapolation. Tried to figure out complicated examples (like extrapolator indicator), but couldn't. I tried to find something similar, but there is no interpolation anywhere, only averaging. The picture shows an example of such interpolation and extrapolation based on the Fourier transform. How can I get a function BETWEEN BARs to be plotted not as a straight line but, for example, as a cubic polynomial or in some other way (not fundamental)? At least simple examples, the extract itself or links, not necessarily with mathematics. Thank you!

 
 
OneDepo писал(а) >>

As an option:

Thank you very much! >> I'll give it a try.

 

Hello.

What may be the problem, the Expert Advisor passes the test in the tester on the demo, but in the tester on the real account it fails. I have the same conditions.

 
Put the EA on tf=m1 and see what the log says when the EA signals to enter.
 

Doesn't open anything at all, immediately after starting the test it says the following (in the picture)

 

I.e. it appears that it loads the zone and immediately deletes it. There is no such thing on the demo. Please advise what is the problem?

 
NTH >> :

I.e. it appears that it loads the zone and immediately deletes it. There is no such thing on the demo. Can you please tell me what's wrong?

>> upload the history for all TFs.

 

When compiling, it gives out a bunch of errors. Help me figure it out, I can't see where I went wrong myself.

//-----------------------------------------------------------------------------+
// Функция возвращает OrderOpenPrice последнего открытого экспертом рыночного ордера               |
//-----------------------------------------------------------------------------+ 
int Last_Order_Price(int Last_price)
for(int i=OrdersTotal(); i>=0; i--)
  {
   if(OrderSelect( i-1, SELECT_BY_POS)==true)
     {
      if(OrderSymbol()!=Symbol())     continue;
      if(OrderMagicNumber()!=123456)  continue;
      if(OrderType()>1)               continue;
      
      Last_price =OrderOpenPrice();
      return( Last_price);
     }
  }
 

TRY THIS FUNCTION AS A SAMPLE.

//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru/                   |
//+----------------------------------------------------------------------------+
//|  Версия   : 19.02.2008                                                     |
//|  Описание : Возвращает цену открытия последней открытой позиций.           |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    sy - наименование инструмента   (""   - любой символ,                   |
//|                                     NULL - текущий символ)                 |
//|    op - операция                   (-1   - любая позиция)                  |
//|    mn - MagicNumber                (-1   - любой магик)                    |
//+----------------------------------------------------------------------------+
double PriceOpenLastPos(string sy="", int op=-1, int mn=-1) {
  datetime t;
  double   r=0;
  int      i, k=OrdersTotal();

  if ( sy=="0") sy=Symbol();
  for ( i=0; i< k; i++) {
    if (OrderSelect( i, SELECT_BY_POS, MODE_TRADES)) {
      if (OrderSymbol()== sy || sy=="") {
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
          if ( op<0 || OrderType()== op) {
            if ( mn<0 || OrderMagicNumber()== mn) {
              if ( t<OrderOpenTime()) {
                t=OrderOpenTime();
                r=OrderOpenPrice();
              }
            }
          }
        }
      }
    }
  }
  return( r);
}
Reason: