Советники: OneSayStreet

 

OneSayStreet:

Стратегия по двум индикаторам: MA и RVI

OneSayStreet

Автор: Vladimir Karputov

 

Hello Vladimir, I am testing your OneSayStreet EA and I see that if the EA is about to open for example a buy trade and there is another buy trade on the same instrument currently open by another EA or a manual trade, it skips and doesn't open it. I am using a different magic number of course.  Can you check it please?

 
Eleni Anna Branou:

Hello Vladimir, I am testing your OneSayStreet EA and I see that if the EA is about to open for example a buy trade and there is another buy trade on the same instrument currently open by another EA or a manual trade, it skips and doesn't open it. I am using a different magic number of course.  Can you check it please?

Покажите настройки советника, пожалуйста. 

 
Vladimir Karputov :

Show the advisor settings , please. 

Here are the almost default settings.

Файлы:
test.set  2 kb
 
Eleni Anna Branou:

Here are the almost default settings.

Обратите внимание на параметр:


и на описание:

Additional features:

Флаг 'Positions: Only one' выставленный в 'true' разрешает советнику иметь в рынке не более одной позиции. За переворот сигналов отвечает флаг 'Positions: Reverse'. Интересный флаг 'Positions: Close opposite' - при выставлении его в 'true' перед открытием позиции гарантированно удаляет противоположные позиции. 'Print log' выводит расширенное логирование всех операций. Параметр 'Freeze and StopsLevels Coefficient' задаёт коэффициент для уровней стопов и заморозки для случаев, когда эти уровни для символа равны нулю. Рекомендуется применять значение '3'.

 
Vladimir Karputov :

Pay attention to the parameter:


and to the description:

Additional features:

The ' Positions: Only one ' flag set to ' true ' allows the EA to have no more than one position in the market . The ' Positions: Reverse ' flag is responsible for signal reversal . An interesting flag ' Positions: Close opposite ' - when it is set to ' true ' before opening a position, it is guaranteed to delete opposite positions. ' Print log ' outputs extended logging of all operations. The ' Freeze and StopsLevels Coefficient ' The recommended value is '3'.

That setting should take into account only trades of that particular EA with the same magic number and not of other EAs, isn't that right?

 
Eleni Anna Branou:

That setting should take into account only trades of that particular EA and not of others, isn't that right?

Данный код универсальный - он считает ЛЮБЫЕ позиции по текущему символу:

//+------------------------------------------------------------------+
//| Calculate all positions                                          |
//+------------------------------------------------------------------+
void CalculateAllPositions(int &count_buys,double &volume_buys,double &volume_biggest_buys,
                           int &count_sells,double &volume_sells,double &volume_biggest_sells)
  {
   count_buys  = 0;
   volume_buys   = 0.0;
   volume_biggest_buys  = 0.0;
   count_sells = 0;
   volume_sells  = 0.0;
   volume_biggest_sells = 0.0;
   for(int i=PositionsTotal()-1; i>=0; i--)
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(m_position.Symbol()==m_symbol.Name())
           {
            if(m_position.PositionType()==POSITION_TYPE_BUY)
              {
               count_buys++;
               volume_buys+=m_position.Volume();
               if(m_position.Volume()>volume_biggest_buys)
                  volume_biggest_buys=m_position.Volume();
               continue;
              }
            else
               if(m_position.PositionType()==POSITION_TYPE_SELL)
                 {
                  count_sells++;
                  volume_sells+=m_position.Volume();
                  if(m_position.Volume()>volume_biggest_sells)
                     volume_biggest_sells=m_position.Volume();
                 }
           }
  }
 
Vladimir Karputov:

Данный код универсальный - он считает ЛЮБЫЕ позиции по текущему символу:

I think that is wrong, it should only count this EA's trades with the same magic number.

If for example have on the same account a manual long term buy trade, the EA will not open a buy trade as long as my manual buy trade is open, that doesn't make sense.

I know that you are doing a great job dedicating your precious time, offering these codes and I congratulate you for that, but a: Positions: only one=true, setting, should apply only to this EA's trades and not others.

 
Eleni Anna Branou:

I think that is wrong, it should only count this EA's trades with the same magic number.

If for example have on the same account a manual long term buy trade, the EA will not open a buy trade as long as my manual buy trade is open, that doesn't make sense.

I know that you are doing a great job dedicating your precious time, offering these codes and I congratulate you for that, but a: Positions: only one: true, should apply only to this EA's trades and not others.

Меня это всегда устраивало. Вероятно в версию version   "3.148" своего торгового движка я внесу такое изменение, но это изменение отразится только на всех будущих кодах.

 
OK, thank you for your time.
 
Eleni Anna Branou:
OK, thank you for your time.

В версии 2 внесены изменения  OneSayStreet 2. Также разблокированы сигналы SELL.

OneSayStreet 2
OneSayStreet 2
  • www.mql5.com
Стратегия по двум индикаторам: iMA (Moving Average, MA) и iRVI (Relative Vigor Index, RVI). Развитие первой версии