I will write an advisor free of charge - page 140

 
Hi all, can someone finish certain trend on the oldest order . Youpo if the price is above the oldest order Bay then the trend is up (opens only buy), and if below the oldest order Sell only sells. I would be very grateful!!!
Files:
mrT.mq4  9 kb
 
Taras Kobryn:
Hi all, can someone please add some trend on the oldest order . Youpo if the price is above the oldest order Bay then the trend is up (opens only buy ), and if below the oldest order Sell only sell. I would be very grateful to you!
In your EA, in the function
double FindLastSellPrice()
  {
   int oldticket, ticket = 0;
   double oldopenprice = 0;

   for(int cnt = OrdersTotal()-1; cnt>=0; cnt--)
     {
      if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))
        {
         if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == OP_SELL)
           {
            oldticket = OrderTicket();
            if(oldticket > ticket)
              {
               ticket = oldticket;
               oldopenprice = OrderOpenPrice();
              }
           }

        }
     }
   return(oldopenprice);
  }

is used.

OrdersTotal(), instead of OrdersHistoryTotal(). You can dance from there...

OrdersTotal

OrdersTotal

Returns the total of open and pending orders. But it should return the oldest closed order

 
Александр:

Try it.

There are coincidences of entry with the signal arrow, but I suppose they are more likely to be coincidental.
 
there is an idea for a qualitatively new prolonger. Anyone interested in working on it?
 

Ooh, tempting offer:)

What prolongs your prolonger?
 

the same as the others - a two-dimensional curve. That is, any chart, like EURUSD or whatever.

I once struggled with spectral decomposition until I understood the fundamental disadvantage of any periodic decomposition. So I developed a new approach.

 
Talk to Alexander, he's a master of decomposition.
Alexander_K
Alexander_K
  • www.mql5.com
Профиль трейдера
 

Hi all. Help me write a simple EA. I want to test one strategy. I have plans to add some more.

1. Instantly open SELL and BUY on a certain currency pair at any TF at thesame time .

2. With adjustable lot (lot volume for example) from 0.01

3. TP and SL adjustable

4. At closing one SELL or BUY wouldreopen with anSELL and BUY as a next step .

If this is already available somewhere (could not find it), please, advise where. I don't need any unnecessary settings.

Thank you

 
Evgeniia Khaganeti:
There are coincidences of entry with the signal arrow, but I suppose they are rather random.

Happy March 8th! Try it. And send me the set. So that the results are the same.

Files:
 
Александр:

Happy March 8th! Try it. And send me the set. To have the same results.

Merci :-)

It still opens wrong. And opened a lot of orders on the first candle.

bool Start_Buy;
bool Start_Sell; - I understood that the owl takes it as a condition to "start selling from now on" and if the conditions coincide, it opens a sell order. But the conditions should coincide on the candlestick with the arrow and on the second candlestick, if the conditions coincide on the second candlestick, it is already late. That is, not "from this point onwards", but "or right now there is a match, or we do not break away and wait for the next signal".

The set is attached.
Reason: