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

 

Good evening everyone. Simple question, but I'm wondering. I've been watching the Ichimoku indicator for a long time, added cyclic lines of 26 bars each, out of ten cycles at least seven are repeated. I have a question, why is the indicator using lead and lag of 26 bars? Why exactly 26, and not 23 or 27? Why is this figure 26? Is it some kind of mathematical relationship and why is it used in all timeframes with the interval of 26? Does the cycle repeat itself regardless of the timeframe? Just curious.

Urain 22.05.2010 01:36 thanks for the reply. I have searched through the forum and have found this script that opens orders. I have tested it and it works easily and places profit equal to 5 pips when opening.

 
mazan >>:

Доброго вечера всем. Простой вопрос, но мне интерсно. Долгое время наблюдаю работу индикатора Ichimoku, добавил циклические линии по 26 баров в каждой, из десяти циклов как минимум семь повторяются. У меня вопрос, почему в индикаторе используется опережение и отставание на 26 баров? Почему именно на 26, а не 23 или 27? Откуда эта цифра 26, это что, какая то математическая закономерность и почему она используется на всех таймфреймах с интервалом 26. Неужели цикл повторяется не смотря на временной промежуток? Просто интересно.

Urain 22.05.2010 01:36 спасибо за ответ. Поискал по форуму, нашел скрипт на открытие ордеров, проверил, работает и профиты в 5 пунктов легко ставит при открытии, как вариант для пипсовки вполне подходит.

These parameters were suggested by Hosoda (the author of the ishimoku). He used this indicator in weeks, while 26 weeks = half a year, 52 weeks = a year. So everybody repeats it :) On the hourlies you may as well use 24 and you will get a cycle ;)
 
valenok2003 >>:
вроде написал, закрывает и открывает все ордера по изменению эквити,

Take it from here and modify it to suit your needs. Yours is very unreliable and works for the whole account at once.

The overshoot on the closing do the opposite. And so on.

 
Necron >>:
эти параметры ведь предложил Хосода (автор ишимоку). Он пользовался этим индикатором на неделях, а 26 недель = полгода вроде, 52 недели - год. Вот и повторяют все :) На часовиках с таким же успехом можно применить 24 и будет вам цикл ;)

Thank you, you've enlightened me. Profit to all!
 
Dear Old-timers! Please tell me, how can I open a position on any bar I specify?
This construction with kim function does not work for me:
if ((NumberOfBarOpenLastPos(NULL, 5, OP_BUY, 531)>0) || (NumberOfBarOpenLastPos(NULL, 5, OP_BUY, 531)==-1))
Если строку выше закомментировать, то открывает позиции на каждом тике, с ней же не открывает ни одной...
Испробовал различные варианты - не помогает...

      {
//---------------------------------------------------------------------
         if (
               --------- Условия для покупки ---------
            )
               {
                  ClosePosFirstProfit(NULL, OP_SELL, 531);            // Если есть позиция Sell с магиком 531,
                                                                         // Закрываем её нахрен
                  Magic=531;
                  New_Comm="Strategy_3_M5_ADD for Addon";                // Задаём комментарий для позиции
                  LnAdd=NormalizeLot(Lots/2);                            // Нормализуем лот, делённый на два
                  OpenPosition(NULL,OP_BUY,LnAdd,StopLoss,TakeProfit,Magic,New_Comm);
               }                                                         // Открываем Buy с магиком 531

//---------------------------------------------------------------------         
    }
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
Ф-ция Игоря:
//+----------------------------------------------------------------------------+
//|  Возвращает номер бара открытия последней позиции или -1.                  |
//|  Параметры:                                                                |
//|    sym - наименование инструмента  ("" - текущий символ)                   |
//|    tf  - таймфрейм                 ( 0 - текущий таймфрейм)                |
//|    op  - операция                  (-1 - любая позиция)                    |
//|    mn  - MagicNumber               (-1 - любой магик)                      |
//+----------------------------------------------------------------------------+
//Пример использования:

// if (NumberOfBarOpenLastPos()>0) 
//      {
  // Можно открывать позиции
//      }
//------------------------------------------------------------------------------

int NumberOfBarOpenLastPos(string sym="", int tf=0, int op=-1, int mn=-1) {
  datetime oot;
  int      i, k=OrdersTotal();
 
  if (sym=="") sym=Symbol();
  for (i=0; i<k; i++) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      if (OrderSymbol()==sym) {
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
          if (op<0 || OrderType()==op) {
            if (mn<0 || OrderMagicNumber()==mn) {
              if (oot<OrderOpenTime()) oot=OrderOpenTime();
            }
          }
        }
      }
    }
  }
  return(iBarShift(sym, tf, oot, True));
}

I.e. I set conditions: If bar number is so-and-so, then open a position, or if -1 (no open position), then open a position, but it's not working for me...
Help, please... :)

 

never having waited for help, walking around to about two weeks, broke the idea-advisor into pieces and decided to do piecemeal for further gluing.

Today was a breakthrough. One part has worked and on the tester from 01.01.2010 till today I've got such results on euro-dollar. And this is the minimum lot, no withdrawal to b.u., with a fixed profit.

Files:
testergraph.rar  10 kb
 

Can you give me a link to such an EA (or automated script)?

I am working on Parabolic. As soon as the trend breaks on P (point jumps up or down), I open a trade. TP is not put, SL=value of Parabolic. SL move after each candlestick. Close the deal when the trend reverses. At 15 minutes and above it works fine, I'm not complaining. But it is stupid to wait for the break.

What would be desirable:

1. For the Expert Advisor to at least crack when the break occurs.

2. I would like the automat script to do it myself.

Thank you in advance

 

Good evening.

Could you please advise whether MQL4 supports operators that represent labels?

For example, there are 4 conditions in a program. I want the program to check the first 3 conditions and return to checking the 1st condition.

 
GOTO operator? God forbid.
 
TheXpert >>:
Оператор GOTO? Упаси Б-г.
What can you replace it with?