Experts: Absorption

 

Absorption:

The EA trades with the Absorption pattern. Working with pending orders Buy Stop and Sell Stop.


Author: Vladimir Karputov

 
Tried it good, manual submagic to 0 is ok
 
I don't understand why it doesn't want to trade at all on my test((((
 

You got it?

 
Антон #:

You got it?

On trading terminals of some forex-dealers (brokers, DCs, etc.) this Expert Advisor may not place pending orders.

Try in the lines

if(m_trade.BuyStop(InpLots,price,m_symbol.Name(),m_symbol.NormalizePrice(sl),m_symbol.NormalizePrice(tp),ORDER_TIME_SPECIFIED,TimeCurrent()+3600*OrderExp,"signal 1"))

и

if(m_trade.SellStop(InpLots,price,m_symbol.Name(),m_symbol.NormalizePrice(sl),m_symbol.NormalizePrice(tp),ORDER_TIME_SPECIFIED,TimeCurrent()+3600*OrderExp,"signal 1"))

ORDER_TIME_SPECIFIED replace it with ORDER_TIME_DAY.

Regards, Vladimir.

 

Thanks, it's all fixed and working...

 

Good day!

I put on real CFD with a small lot for about 50 pairs at once. The situation is as follows - sometimes several dozens of orders are opened for some pairs at the same time and in one direction. And so several times a day. It turns out that the Expert Advisor does not control such multiple openings. Is it possible to correct something in the code for such a case? For now I just have to disable such a pair from trading. The result can be seen on the attached screen.

Files:
MT5.jpg  138 kb
 
Today's example is three consecutive open positions and a journal entry about them.
Files:
mt5-2.jpg  42 kb
mt5-3.jpg  26 kb