Is anyone able to write an advisor for a profitable system? - page 4

 

Let's try it)))) I'll put on a real cent account and see)))

 
There will be negative trades, but the + will be much higher
 
Try this option. Somewhere I saw an EA with virtual SL and TP. That's a good one. In general, if we do it the way you want, only one position should be opened on one bar. I have to see how to do it. I will try it now. My Expert Advisor has a 10 pips profit. If it will not open trades, then put 10 + spread. We will see what we can do.
Files:
experts_1.rar  5 kb
 
Let's test it.
 

already much better but (

I need to remove take profit and do as I said before: we open buy position and advisor closes position in 4-5 pips or in 4-5 pips and then it closes the position.)

 
Pyxlik2009 >>:

уже намного лучше но (

Вобщем надо доделать убрать тейк профит и сделать так как я уже говорил появляется точка открываем бай и советник сам закрывает позицию через 4-5 пипсов в + либо появляется другая точка тогда закрывается вот тогда будет супер )))

Let's do it.

 

Looking, trying...

No Take, no Loss, the pose is closed either at a signal to the opposite side, or when the profit reaches the value set in the EA settings (Profit, the default value is 5 pips). I have not yet figured out how to open only one position on one bar. I am still looking for the variant of how to do it. It would be great for me... (for scalper:))

Files:
experts_2.rar  6 kb
 
i looked at the visualisation on the attached file, it worked out a takeprofit of 200, with a stop of 800, and the deposit is growing linearly, but the table does not match the visualisation for each bet, what could be the problem? Man and where does this winds up HERE highlighting it's own dreams!!!
Files:
 
Necron >>:

Смотрим, пробуем...

Тейка нет, лося тоже нет, поза закрывается или при сигнале в противоположную сторону, или когда прибыль достигает значения, установленного в настройках советника (Profit, по умолчанию равно 5 пп). Пока не разобрался как сделать, чтоб открывалась только одна поза на одном баре. Еще ищу вариант как это сделать. Цены б ему не было... (для скальпера:))


We add to the condition that if there is an EA order in the market, then do not open more orders, thus we ensure that only one order is in the market at a time. To do this, we use OrderSelect to scoop all orders from the market and check their wizard; if there is an order with such a wizard, we save it into a variable and include an additional check of this variable before the function of opening orders.
 

Thank you, but I found this option.

bool CheckExists(int Type)
 {
  bool Result = True;
  for(int i = 0; i < OrdersTotal(); i++)
   if(OrderSelect( i, SELECT_BY_POS))
    if(OrderType() == Type && OrderMagicNumber() == MagicNumber && OrderSymbol() == Symbol())
     if(OrderOpenTime() >= Time[0])
      Result = False;
  for( i = 0; i < OrdersHistoryTotal(); i++)
   {
    if(OrderSelect( i, SELECT_BY_POS, MODE_HISTORY))
     if(OrderType() == Type && OrderOpenTime() >= Time[0] 
        && OrderMagicNumber() == MagicNumber && OrderSymbol() == Symbol())
      Result = False;
    }    
      
  return( Result);    
  }


//Использование:

if( CheckExists(OP_BUY))   {    // Открытие Buy    }