Thanks for sharing, I found your coding elegant.
However, the EA shows some annoying bugs. When I put to test over a period of one year, it only operates in the month of January, and in specific week days , in the EURUSD. I haven't changed your code.
Sorry, I did not understand your thought.
hi
Thank you for sharing .... I need to code myself any recommendations or books I can read or learning materials?
Thank You Again.
*** I need to code myself any recommendations or books I can read or learning materials?***
I do not understand you.
in the section below: where m_trade.ResultDeal()!=0 which means the deal ticket is return which means the order is completed, why do you still use condition
if(m_trade.ResultRetcode()==10009) { m_waiting_transaction=true; // "true" -> it's forbidden to trade, we expect a transaction m_waiting_order_ticket=m_trade.ResultOrder();//current processing order }shouldn't we strictly set the m_waiting_transaction = false?
____________________________________________________________________________________below is the part of the code
if(m_trade.Buy(long_lot,m_symbol.Name(),m_symbol.Ask(),sl,tp)) // CTrade::Buy -> "true" //if a open buy order placed successful { if(m_trade.ResultDeal()==0)//if there is no closed deal returned--position open not DONE yet { if(m_trade.ResultRetcode()==10009) // trade order went to the exchange | Request completed { m_waiting_transaction=true; // "true" -> it's forbidden to trade, we expect a transaction m_waiting_order_ticket=m_trade.ResultOrder();//record current processing order to be confirmed } else m_waiting_transaction=false;//new trade allowed if(InpPrintLog) Print("#1 Buy -> false. Result Retcode: ",m_trade.ResultRetcode(), ", description of result: ",m_trade.ResultRetcodeDescription()); if(InpPrintLog) PrintResultTrade(m_trade,m_symbol); } else { if(m_trade.ResultRetcode()==10009) { m_waiting_transaction=true; // "true" -> it's forbidden to trade, we expect a transaction m_waiting_order_ticket=m_trade.ResultOrder();//current processing order } else m_waiting_transaction=false;//new trade allowed if(InpPrintLog) Print("#2 Buy -> true. Result Retcode: ",m_trade.ResultRetcode(), ", description of result: ",m_trade.ResultRetcodeDescription()); if(InpPrintLog) PrintResultTrade(m_trade,m_symbol); } }
- www.mql5.com
Hi Mr Vladimir Karputov, I love your contribution to the community, there is one thing I suspect you there is a bug in one of your function you used quite a lot: OpenBuy,
in the section below: where m_trade.ResultDeal()!=0 which means the deal ticket is return which means the order is completed, why do you still use condition
shouldn't we strictly set the m_waiting_transaction = false?
____________________________________________________________________________________below is the part of the code
There is forex, but there is a conclusion of transactions on the exchange: A General Scheme of Trading Operations
If a
Gets the deal ticket |
returned '0' need to check what the method returned
Gets the code of request result |
- if it returned '10009'
10009 | TRADE_RETCODE_DONE | Request completed |
- we will wait for the deal
SPosition[index].waiting_transaction= true ;
SPosition[index].waiting_order_ticket=m_trade.ResultOrder();
- www.metatrader5.com
@Icarus, # Icarus,
When using the MT5 Strategy Tester make sure you set the Date to "Custom Period" then next to that (on the right) manually set the date you wish to use.
I have been testing this ea myself and have not found the related issue you mention, it is running and I have the date set for 12 months and it is currently at 3 months at the time of writing this message.
Hope this helps
При использовании Тестера стратегий MT5 убедитесь, что вы установили дату в «Пользовательский период», а затем рядом с ним (справа) вручную установите дату, которую вы хотите использовать. Я сам тестировал этот советник и не нашел связанной с этим проблемы, о которой вы упомянули, он работает, и у меня установлена дата на 12 месяцев, а на момент написания этого сообщения на данный момент 3 месяца.
Hi Vladimir, Great expert, I'm just wondering if you can add an option to your input settings? It would be nice if the operator could disable and / or enable the Trailing Step option, as some strategies do not work with Trailing Step. If the trailing step is disabled, the EA will rely on the trailing stop. Is it possible? Thank you in advance.
hi
Thank you for sharing .... I need to code myself any recommendations or books I can read or learning materials?
Thank You Again.
This is a good place to start.
https://www.mql5.com/en/docs
- www.mql5.com
Привет Владимир
У меня вопрос.
Но сначала я попытаюсь объяснить свою проблему.
Теперь? Когда я торгую вручную, я могу разместить сделку с размером лота 0,20, что составляет 2 доллара США, но?
Когда я помещаю ваш советник на свой график, он не будет торговать 0,20 лота, я должен уменьшить его до 0,10 $ 1,00.
Мой вопрос, почему?
Я посмотрел на ваш экспертный код и увидел <Expert \ Money \ MoneyFixedMargin.mqh>
а также
CMoneyFixedMargin * m_money;
Является ли фиксированная маржа установленным пределом?
В МТ5, когда я смотрю на свой счет, написано «Свободная маржа».
Это другое?
Могу ли я изменить код фиксированной маржи на свободную маржу?
Поможет ли это с разными размерами лотов для ручной и экспертной торговли?
Hi Vladimir
I have a question.
But first I will try to explain my problem.
Now? When I trade manually, I can place a trade with a lot size of 0.20, which is $ 2, but?
When I put your EA on my chart, it will not trade 0.20 lots, I have to reduce it to 0.10 $ 1.00.
My question is why?
I looked at your expert code and saw <Expert \ Money \ MoneyFixedMargin.mqh>
and
CMoneyFixedMargin * m_money;
Is the fixed margin a set limit?
In MT5, when I look at my account, it says “Free Margin”.
Is it different?
Can I change the Fixed Margin Code to Free Margin?
Will it help with different lot sizes for manual and expert trading?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MA Trend:
A trading system based on indicator iMA (Moving Average, MA).
Author: Vladimir Karputov