Libraries: NELODI Trading Terminal for MT5 - page 2

 

Released another update, which renames the input parameter "Avoid Hedging Trades" to "Hedging Allowed" and swaps the default behavior to ALLOW HEDGING (was set to avoid hedging in the previous update).

It also includes some new variables (not published as input parameters), which can be used to change the way free margin is calculated, and ... to automate closing positions on low margin (disabled by default). If that sounds interesting, then check the "NLD_Expert.mq5" file and you will see these 4 variables declared at the top:

double  iMarginStop=0;        // Low Margin Level (Balance%) {0}
bool    iCloseOnMargin=false; // Close best on Low Margin? {false}
bool    iAllSymbols=false;    // Global (ALL Symbols)? {false}
int     iCheckInterval=250;   // Check Interval (ms) {250}

If you change "iCloseOnMargin" to true (default=false), the "NLD_Expert" will be automatically closing the best performing position if margin drops below the Low Margin Level ("iMargiStop" variable), which is defined as the percentage of Account Balance until the Stop-Out level of your Broker is reached. Available Margin is also displayed on "NLD_Trade", so make sure to update the same variable there, if you change it in "NLD_Expert".

The rest should be self-explanatory.

 

And ... here's another update, this time for the "NLD_Main" indicator:

  • Replaced gray filling and 3 dashed lines (used to show the center of moving averages) with a single white dashed line.
  • Fixed the color used for trend line centers to yellow-white. Previously, the color of two trend centers was changing based on the slope of each trend, which made the center line harder to spot. Slopes of all calculated trends can still be seen in the right side of the chart as vertical red/green bars (also used to indicate direction of candles on all time-frames).
  • All calculations are now based on the OPEN price and updated only once at the end of each period. In other words, instead of re-calculating the right side of the Main chart with every price move, it will now only be calculated at the end of the candle. This further reduces CPU usage and gives the right side of the Main indicator more stability (no more jumping around before the candle closes).

NOTE: If you want to test the NLD_Main indicator in the Strategy Tester, change the "Auto-Scale Chart" input parameter to false, because the Strategy Tester does NOT seem to be updating the min and max prices, so the price would just ran out of screen in the Strategy Tester window if "Auto-Scale Chart" is true (default). The "Auto-Scale Chart" feature only works correctly on live charts.

 

Released another update:

  • Added a custom ADX (Average Directional Movement Index) indicator, which can be used as confluence (confirm trend direction) and to filter out false signals.
  • Removed color from bars in the Volume indicator (now painting all bars dark grey), so it can be combined with the new ADX indicator in the same chart, to save space.
 
Extended "NLD_Trade" and "NLD_Expert" with the option to display the current profit/loss value of the BEST performing POSITION (new default), as an alternative to previously added options for showing the Total, Only Profits or Only Losses (displayed in a center between BUY and SELL profit/loss values). This is now the default value for the "BUY/SELL Center" input parameter.
 
Since trends on higher time-frames result in the strongest moves, I've added trend lines for the next higher time-frame. And because doing that resulted in way too many lines being drawn, I've removed the 3 less relevant lines per trend, two of which were used for the extreme upper and lower bounds, plus the center line (which is always in the center between high and low). So ... now, there are two lines for the upper bounds and two lines for the lower bounds per trend, but no center trend lines. That's a total of 6 lines for upper trend bounds, 6 for lower trend bounds and 9 for moving averages (4 high, 4 low and 1 center). I know, that is still a lot of lines to watch, but without keeping an eye on the higher time-frames, it's easy to get caught by surprise when a trend on a higher time-frame finally turns.
 

Released another update for the "NLD_Main" indicator:

  • In addition to trend lines for 3 shorter time-frames (based on 1 hour, 4 hours and 12 hours on the M1 time-frame), I've added lines for 2 longer time-frames on the "NLD_Main" indicator. Only lines from 3 shorter time-frames will always be kept in the visible range when "Auto-Scale Charts" is true (default), though, because trend lines from longer time-frames only have a direct effect on price movement if trend lines from shorter time-frames are in close proximity.
  • Added Profit Potential and Loss Risk in the Account Currency, which is now being continuously calculated as proximity of the current BID price to the Top and the Bottom of Trend Lines. Values are displayed in RED/GREEN boxes on the left-top corner of the Chart, as well as directly on the Chart, on the right side of each Top and Bottom Trend Line. GREEN buttons represent the potential for BUY Profits and Risk for SELL Losses, while RED buttons represent the potential for SELL Profits and the Risk for BUY Losses. All values are in Account Currency and are calculated for a single open position, but do NOT include the spread and commission costs for opening and closing a position. Additionally, the current cost to open and close a position and the proximity to the highest and lowest price currently visible on the chart are now also displayed in account currency, directly on the right side of the chart.
  • Moved buttons showing Trend directions from the right side (M1-MN buttons) to the left side. They can now be found directly between the newly added profit/loss potential/risk values (green is up, red is down).
    NOTE: Profit and Loss values can only be calculated if TRADE_TICK_VALUE info is available for the Symbol.
     
    Released another update, to remove trend-lines and profit/loss potential/risk values for the two longest time-frames. There was just too much noise (couldn't see trees in the forest).
    Reason: