Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Libraries

NELODI Trading Terminal for MT5 - library for MetaTrader 5

NELODI

Views:
789
Rating:
votes: 10
Published:
2019.10.08 12:33
Updated:
2019.10.18 10:02
ShotA.png (622.28 KB)
ShotB.png (607.46 KB)
NLD_Include.mqh (125.8 KB)view
NLD_Chart.mq5 (10.34 KB)view
NLD_Trade.mq5 (35.02 KB)view
NLD_Expert.mq5 (25.24 KB)view
NLD_Main.mq5 (118.82 KB)view
"NLD_Main" is a trend indicator, designed to identify the most relevant trends and trend reversals for the currently selected time-frame.


"NLD_Chart" is a custom price indicator, which can be used as a replacement for candles or bars, to make price movements easier to visualize, especially when the chart is zoomed out (to see more data).

"NLD_Expert" and "NLD_Trade" work together to provide an easy-to-use trading terminal, including a Tick-Chart with recent Highs and Lows, BUY/SELL buttons, the current profit/loss value of all open positions (separated in BUY, SELL and TOTAL) for the current Symbol, as well as all the important Account information (Balance, Equity and Margin), swap cost and the cost to open a new position, plus ... the current Server time and the time left until the end of the current candle.

"NLD_Expert" is an Expert Advisor, which is required by the "NLD_Trade" indicator for opening and closing positions. "NLD_Expert" does NOT open or close positions on its own, though. Instead, it places a BUY or SELL order for the Symbol when you click the BUY or SELL button, unless there is a position open in the opposite direction (SELL was open when you clicked BUY, or BUY was open and you clicked SELL) and the "Avoid Hedge" input parameter is TRUE (default value), in which case (to avoid Hedging positions with identical volume), the "NLD_Expert" is going to close one position from the opposite direction, instead of opening a new a position in your trade direction. In other words, it will close one open SELL position when you click BUY, or close one open BUY position when you click SELL. This avoids paying double spread and commission for trades, closing your trades at the current market price, allowing you to cut your losses sooner and reduce your exposure, or simply close your trades with a profit. You can also close all your open positions (BUY, SELL or TOTAL) by clicking the profit/loss value, which will be shown when you have a position open and updated as the price moves up/down.

"NLD_Main", "NLD_Trade" and "NLD_Expert" have "Forex" and "Stock Commission" as input parameters, which you should update to reflect the Commissions charged by your Broker. These values are in your Account Currency and are set to "0.06" and "0.36" by default. For Accounts where Broker commission is in the Spread, change these parameters to 0.

To configure a new MT5 chart for using "NELODI" as your Trading Terminal, add
"NELODI" Indicators and the Expert Advisor to your Chart(s), in the following order:

1. NLD_Chart (custom Price line) *optional
2. NLD_Main (Main indicator) *recommended
3. NLD_Volume (Volume indicator) *recommended
4. NLD_Trade (Tick chart with Trade info & BUY/SELL buttons) *required
5. NLD_Expert (Required for Trading, "Allow Automated Trading" has to be checked) *required

For best chart performance, reduce "Max bars in chart" to 15000, but do NOT go much lower than this, because the main "NELODI" chart requires >10000 bars to calculate correctly.

When trading, take into account that ALL THE PRICE ACTIONS YOU SEE NOW have already happened in the past. Even if you have a very fast connection to your Broker, there will ALWAYS be a delay between the time something happens on the Market and the time you see it happen.

Also, when you click a button to open or close a position, it will take time for your action to be sent to the Broker and Executed. These delays accumulate and can result in a considerable difference between the prices you see before clicking a button and the prices you actually get filled with (once your orders are executed by the Broker).

"NLD_Expert" was built to minimize the negative side-effect of delayed execution by using asynchronous calls and sending all your orders in batches, but ... there is a limit for the number of orders that can be placed in a single batch, because of which a single Click to close all open positions can result in multiple batches being sent to the Broker, during which time the price can move considerably against you before all your orders have been executed. For the best performance when closing positions, keep the number of open positions as low as possible.

Now that you know the basics, you can start using "NELODI" with a *DEMO* account.

Because "NELODI" opens and closes positions at the current market price and does NOT use "Pending Orders", "Take Profit" or "Stop Loss" positions, the results you get when using "NELODI" on a DEMO account (under normal market conditions), should be comparable to the results you would get if you were trading on a REAL account.

In other words, if your results are consistent over a longer period of time when trading with "NELODI" on a DEMO account, you should see comparable results when trading on a REAL account, providing the market conditions remain the same.

On the other hand, if you keep making profits on a DEMO account, but keep making losses on a REAL account, then you should revise your trading strategy, because ... you are either reading the charts wrong, or your strategy relies too much on luck.

All indicators included in this package are non-repainting, which means that the LEFT side of the chart does NOT change as new data arrives. In other words, everything LEFT of the white vertical dotted line, which is always drawn at the current time and price, belongs to History and does NOT change with price movements in the future. This allows you to look at chart history and learn how the Main indicator works. What does change, however, is the RIGHT side of the Main chart (everything from the current price line into the future), so that part of the chart should ONLY be seen as the extension of the current price-action. The RIGHT side of the chart is calculated based on the assumption that the price would remain at the same spot, so be aware that it is going to look quite differently if the price moves up or down.

If you do NOT want to see the RIGHT side of the Main chart (which is dynamic and changes as the price moves up or down), you can set the "ExtraRange" variable to zero (0) in the "OnInit" event of the "NLD_Main.mq5" file, directly after the "PriceWid" calculation, like this ...

void OnInit()
  {
   PrepareAccount(_Symbol,iCommisForex,iCommisStock);

   PriceWid=MathMin(ExtRange1/2,ExtraRange/2);
   
   ExtraRange = 0; // <- LINE ADDED

That's it. Have fun trading!

DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

USE AT YOUR OWN RISK!

Programming Patters - Builder (classic) Programming Patters - Builder (classic)

Separate the construction of a complex object from its representation so that the same construction process can create different representations.

Programming Patterns - Factory Method Programming Patterns - Factory Method

Define an interface for creating an object, but let subclasses decide which class to instantiate. Lets a class defer instantiation to subclasses.

NELODI Trend Painter NELODI Trend Painter

Trend indicator similar to Ichimoku Kinko Hyo, with a number of drawing options and calculation parameters.

NELODI Trend Waves for MT5 NELODI Trend Waves for MT5

Monster Trend indicator that uses data from several time periods.