Discussion of article "Visual strategy builder. Creating trading robots without programming" - page 5

 
Реter Konow:

1. Got it. With scrolling, just like with the window drag handle. You have to press once and then again and hold. Then everything works.

5. If a window has gone out of scope, you need to use the main scroll bar. Then it can be brought back to the visibility area.

Thanks for the comments!

1) You just need to press (1 time without releasing) and hold and drag. Not once, again and again and again :)

5) You can move the scheme by the bottom part too. The main layer can also be moved as a map, without scroll bars. You have to "grab" an empty space and move it.

Yes, I intentionally didn't make hints about resize etc. I remember what and where from the first time, and then they are always bothering my eyes, even though they are not necessary.

 
Andrey Barinov:

Thanks for the comments!

1) You just have to press (1 time without releasing) and hold and drag. Not once, again and again and again :)

5) You can move the scheme by the bottom part too. The main layer can also be moved as a map, without scroll bars. You have to "grab" an empty space and move it.

Yes, I intentionally didn't make hints about resize etc. You remember what and where from the first time, and then they are always bothering your eyes, although they are not necessary.

Got it. Thank you. Really very convenient. But I still can't pull far with the first grip. Neither the window, nor scrolling. But if I press it again, then everything works.

I don't know the reason.

 
Personally, my subjective opinion is that I am against such programmes. MQL is a very flexible and powerful language. It can be used to implement absolutely everything, any "perversions" that will visit the trader's head. In the programme everything is implemented within certain limits, which was initially set by the author of the programme, yes it is possible to build a robot, yes it may work. But I can do it in MetaEditore and also for free.
 
I don't even know what's easier to learn MQL or this constructor....
 
Just for fun. Forex is not an area where such applications are in high demand
 
Aleksey Vyazmikin:

The idea is good, looks interesting, but the ready EA is already a bit tilted - it requires the ability to build with scrolling down or sideways.

Such an interface is necessary for ME - write in a square code and connect, convenient, especially if you can make your own icons and save as a blank - think MQ.

However, I am confused, there is no code at the end of the article and in the article itself, which means it is an advertisement of the product. What, is it now possible to write articles about your product and have them published, or is this a behind-the-scenes arrangement for a select few?

It has long been possible to write articles about your product. Another thing is that MQ may not let all articles through. Only those that they deem worthy of publication.

The author of the article has created a great product. But it needs to be improved. It is desirable to use the mouse wheel in the right and left lists. To scroll through these lists.

One can feel the great potential of this development.


====

What is bad. After uninstalling this utility (Expert Advisor), the colour scheme of the window with the chart is changed. Before installing the utility, the colour scheme was the same. After installation the colour scheme changes. This is a disadvantage.

It is necessary to return to the colour scheme that was before the installation of the utility when removing the utility from the chart. It is better not to change the colour scheme at all. All manipulations should be done in an additional window formed on top of the chart. This is the way I do it when creating patterns graphically. A window is created on top of the chart where everything is drawn. After deleting this window, there is no need to correct something on the chart. Everything created in the window is saved in files.

 
Andrey Barinov:

trade class is implemented as a static class and can be used separately from the rest of the code.

I looked with interest at the trade class in the generated source code (MQL5 >600Kb, EX5 > 250Kb).

class cTrade final
  {
   //====================
private:
   //====================
   //===============
   //===============
   void              cTrade(void){}
   virtual void     ~cTrade(void){}
   //===============
   //===============
   static void       AddCurrentTrades(const cTradesFilter &filter,long &tickets[]);
   static void       AddCurrentOrders(const cPendingOrdersFilter &filter,long &tickets[]);
   static void       AddHistoryTrades(const cTradesFilter &filter,long &tickets[]);
   static void       AddHistoryOrders(const cPendingOrdersFilter &filter,long &tickets[]);
   //===============
   //===============
   static double     CheckLot(const string symbol,const double lots);
   static bool       CheckPlaced(const string symbol,const eTradeType type,const long magic);
   static bool       CheckMargin(const string symbol,const double volume,const eTradeType type,const double price);
   static bool       CheckOrderPrice(const string symbol,const ePendingOrderType type,const double price);
   static bool       CheckStops(const string symbol,const eTradeType type,const bool istrade,const double entrylevel,
                                const double stoploss,const double takeprofit);
   //===============
   //===============
   static int        GetMatch(const cTradeInfo &trades[],const int forindex,const long &matched[]);
   static void       TradesCloseBy(const long &tickets[],const bool slippageenabled,const long slippage,const ENUM_ORDER_TYPE_FILLING filling);
   //===============
   //===============
   static void       ModifyTrade(const long ticket,const double newsl,const double newtp);
   static void       ModifyPendingOrder(const long ticket,const double newprice,const double newsl,const double newtp,const datetime newexpiration);
   //===============
   //===============
   static void       CloseBy(const long ticket1,const long ticket2,const ENUM_ORDER_TYPE_FILLING filling);
   //===============
   //===============
   static void       BreakEven(const long ticket,const long belevel,const long beprofit);
   static void       TrailingStop(const long ticket,const long tslstart,const long tsldistance,const bool tsllevelenabled,const double tsllevel);
   //===============
   //===============
   static void       CalculateSLandTP(const string symbol,const eTradeType type,const double entrylevel,const double lots,
                                      const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                                      const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                                      const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice,
                                      double &sllevel,double &tplevel);
   //===============
   //===============
   static bool       CanTrade(void);
   //===============
   //===============
   //====================
public:
   //====================
   //===============
   //===============
   static long       ProfitPointsGet(const eTradeType type,const double openprice,const double closeprice,const string symbol);
   static double     CommissionGet(const long positionID);
   //===============
   //===============
   static void       GetFilteredTradesTickets(const cTradesFilter &filter,long &tickets[]);
   static void       GetFilteredPendingOrdersTickets(const cPendingOrdersFilter &filter,long &tickets[]);
   //===============
   //===============
   static double     GetLot(const string symbol,const long slpoints,const double moneyrisk);
   //===============
   //===============
   static void       OpenTrade(const string symbol,const eTradeType type,const double lots,const long magic,const string comment,
                               const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                               const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                               const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice,
                               const bool slippageenabled,const long slippage,
                               const ENUM_ORDER_TYPE_FILLING filling);
   static void       PlacePendingOrder(const string symbol,const double price,const ePendingOrderType type,const double lots,
                                       const long magic,const string comment,
                                       const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                                       const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                                       const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice,
                                       const bool expirationenabled,const datetime expiration,
                                       const ENUM_ORDER_TYPE_FILLING filling);
   //===============
   //===============
   static void       ModifyTrade(const long ticket,const bool tightenstopsonly,
                                 const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                                 const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                                 const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice);
   static void       ModifyTrades(const long &tickets[],const bool tightenstopsonly,
                                  const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                                  const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                                  const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice);
   //===============
   //===============
   static void       ModifyPendingOrder(const long ticket,const bool priceenabled,const double price,const bool tightenstopsonly,
                                        const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                                        const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                                        const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice,
                                        const bool expirationenabled,const datetime expiration);
   static void       ModifyPendingOrders(const long &tickets[],const bool priceenabled,const double price,const bool tightenstopsonly,
                                         const bool slpointsenabled,const long slpoints,const bool tppointsenabled,const long tppoints,
                                         const bool slmoneyenabled,const double slmoney,const bool tpmoneyenabled,const double tpmoney,
                                         const bool slpriceenabled,const double slprice,const bool tppriceenabled,const double tpprice,
                                         const bool expirationenabled,const datetime expiration);
   //===============
   //===============
   static void       CloseTrade(const long ticket,
                                const bool slippageenabled,const long slippage,
                                const ENUM_ORDER_TYPE_FILLING filling);
   static void       CloseTrades(const long &tickets[],const bool closeby,
                                 const bool slippageenabled,const long slippage,
                                 const ENUM_ORDER_TYPE_FILLING filling);
   //===============
   //===============
   static void       DeletePendingOrder(const long ticket);
   static void       DeletePendingOrders(const long &tickets[]);
   //===============
   //===============
   static void       BreakEven(const long &tickets[],const long belevel,const long beprofit);
   static void       TrailingStop(const long &tickets[],const long tslstart,const long tsldistance,const bool tsllevelenabled,const double tsllevel);
   //===============
   //===============
  };


What is the purpose of this line?

static bool cTrade::CheckPlaced(const string symbol,const eTradeType type,const long magic)
  {
//===============
   const int ordersnumber=::OrdersTotal();
//===============

//===============
   for(int i=0;i<ordersnumber && !::IsStopped();i++)
     {
      //===============
      const long ticket=(long)::OrderGetTicket(i);
      //===============

      if(::OrderGetInteger(ORDER_POSITION_ID)>0)continue;
      //===============

Live order with non-zero ID - partially executed?


Could not find the Filling calculation in the code.

 
fxsaber:

I looked with interest at the trading class in the generated source (MQL5 >600Kb, EX5 > 250Kb).


What is the purpose of this line?

Live order with non-zero ID - partially executed?


Couldn't find the Filling calculation in the code.

#1. This is based on: #9

#2. I have never managed to find a working variant of filling calculation that would work on all brokers. That's why I suggest the user to control it himself by setting the parameters of the corresponding elements.

 
Eugeni Neumoin:

It has long been possible to write articles about your product. Another thing is that MQ may not accept all articles. Only those that they consider worthy of publication.

The author of the article has created a great product. But it needs to be improved. It is desirable to use the mouse wheel in the right and left lists. To scroll through these lists.

I can feel the great potential of this development.


====

What is bad. After uninstalling this utility (Expert Advisor), the colour scheme of the chart window is changed. Before installation of the utility the colour scheme was the same. After installation the colour scheme changes. This is a disadvantage.

It is necessary to return to the colour scheme that was before the installation of the utility when removing the utility from the chart. It is better not to change the colour scheme at all. All manipulations should be done in an additional window formed on top of the chart. This is the way I do it when creating patterns graphically. A window is created on top of the chart where everything is drawn. After deleting this window, there is no need to correct something on the chart. Everything created in the window is saved in the files.

Thank you for your comments!

In your indicator, the panel does not occupy all the chart space, so the chart layout does not change. I have a panel on the whole available size, and if I don't change the chart scheme, there will be unpleasant artefacts.

I'll think about returning everything to its original state when removing the utility from the chart.

I will add wheel scrolling in future versions. Thanks!

 
Andrey Barinov:

#1. It's based on #9.

Thanks, I'd forgotten.

#2. I have never managed to find a working variant of calculating filling that would work on all brokers. That's why I suggest the user to control it himself by setting the parameters of the corresponding elements.

Could you please send me the name of the demo-server where GetFilling doesn't work?