Hello, Vladimir.
Can you add only Buy and only Sell buttons to this Expert Advisor?
Thank you.
Here is the second version of MA Trend 2:
... added the Type traiding restriction parameter:
- Only BUY - it is allowed to open only BUY
- Only SELL - it is allowed to open only SELL
- BUY and SELL - it is allowed to open both BUY and SELL
...
Happy New Year. Can you tell me if this Expert Advisor is suitable for Forts. I am interested in settings for 1 lot, etc.
Happy New Year. Can you tell me if this Expert Advisor is suitable for Forts. I am interested in settings for 1 lot, etc.
Who is "Forts"? I know Forex, I know Exchange, I know Forts - I don't know such a beast :)
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
- 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