MetaEditor Block Statement Collapsing Features.

 

Hello! I sincerely appreciate the environment and the ability to develop a trading Bot based on predefined strategy, it makes trading easier. Today, I really want to request that your team should look into the idea of adding features to the MetaEditor to allow developers collapse and expand a block statement in a nested block statement. it will make it easier to navigate through several lines of codes.. it's disturbing to the eyes having to navigate through just to identify a code block. Thank You!


if(yIndicatorAnchor.getBuffer(2)>grIndicatorAnchor.getBuffer(2) && yIndicatorAnchor.getBuffer(1)<grIndicatorAnchor.getBuffer(1) && Bars(Symbol(), AnchorTimeFrame, anchor_candles[1].time, signal.anchor_CB)>=bar_min && Bars(Symbol(), AnchorTimeFrame, anchor_candles[1].time, signal.anchor_CB)<=bar_max)      //Anchor TimeFrame Bullish Trend "Cross_In" If Statement.
                  {
                     signal.anchor_CA= anchor_candles[1].time;
                     signal.signal_sl= grIndicatorAnchor.getBuffer(2);
                     PrintFormat("AnchorBullish_Trend: price at Cross In if is %s and datetime is %s", DoubleToString(anchor_candles[1].close), TimeToString(signal.anchor_CA));
                     ccObject.drawTrendLine(signal.anchor_CB, signal.anchor_CA, signal.anchor_hilow_price, clrRed, "Anchor Cross Out_In");
                    if(anchor_candles[1].open>signal.anchor_hilow_price && anchor_candles[1].close<signal.anchor_hilow_price)    
                      {
                        PrintFormat("AnchorBullish_Trend: price at Cross Out if(if) is %s and datetime is %s", DoubleToString(anchor_candles[1].close), TimeToString(signal.anchor_CA));
                        signal.sell= anchor_candles[1].close<signal.anchor_hilow_price;
                        signal.signal_tp= 0;
                        signal.signal_eprice= anchor_candles[0].open;
                        PrintFormat("Sell Executed at if if %s's cross In", EnumToString(AnchorTimeFrame));
                      }    
                      
                   } 
 
official.bayo:

Hello! I sincerely appreciate the environment and the ability to develop a trading Bot based on predefined strategy, it makes trading easier. Today, I really want to request that your team should look into the idea of adding features to the MetaEditor to allow developers collapse and expand a block statement in a nested block statement. it will make it easier to navigate through several lines of codes.. it's disturbing to the eyes having to navigate through just to identify a code block. Thank You!


As a workaround I comment the end brackets, its old school but it helps - the bracket matching and styler functions also help.

What would also be handy would be a refactor tool (as in Eclipse)

 
R4tna C #:

As a workaround I comment the end brackets, its old school but it helps - the bracket matching and styler functions also help.

What would also be handy would be a refactor tool (as in Eclipse)

Hi! Yeah, I comment the end brackets as well. The above code is just a fraction. Doing that is not productive if you ask me cos there are more important stuffs to focus on. I just hope the MQL team will not ignore the request. It's very important for Programmers. I am from Java Background and it's very much easy with the collapsing feature.