MQL5 Tutorial – Advanced Trailing Stop

Published on November 22, 2021

https://www.youtube.com/watch?v=VL1_NGaAOaU

Interesting reviews related to Trading Plan, Determining Market Cycles, and Advanced Stochastic Scalper Mt5, MQL5 Tutorial – Advanced Trailing Stop.

https://mql5tutorial.com

With MQL5 for Metatrader5 we create an Expert Advisor for multiple Trailing Stop Adjustments for several trades in one currency pair. That will enable you to protect your opened positions while you are not in front of your Forex Chart…

Today we are looking at the advanced trailing stop. We have two open positions here, and as you can see, we have two trailing stops. I will speed it up a little bit here and now our two stops have been triggered and our trailing stop is continually rising – if the price is going up. And if the trailing stop is below 150 points from the current ask price. So let’s zoom in here and you can see what happens. Now the price is going up and you’ll see the trading stop is rising and as the price falls nothing happens. But when it goes up again, you will also see the rising trailing stop here. Actually, it’s two lines for two trailing stops. Now how can we create an expert advisor that is going to trail the stop loss for each of the open trades?

To do that, please click on the little button here or Press F4 to open the Meta Editor. And in the Meta editor, you want to click On File, new, Expert Advisor from Template. Continue. I will call this Expert Advisor advanced Trailing stop. Continue, continue, finish.

And now we can delete everything above the Ontick function and the two comment lines here. To use the trailing stop, we need an open trade, so let’s include the trade MQ file here and create an instance of the class Ctrade. And in the Ontick function, we need to calculate the ask price. That is done with the function symbol info double, and we use normalize double and the expression digits to get the actual value for the currency. Because we have some currencies with three and other currencies with five digits behind the dot.

And we do that for the current symbol on the chart. And we use symbol underline Ask to get the ask price and put it into this double variable.

If you mark symbol underline Ask and press the F1 key, you will see that you can get lots of information. For example, symbol underline bid would deliver the bid price. In our example, we want the trailing stop to work for more than one position. So now we check if we have less than two opened positions, and if that is the case, we use our trade instance to open a buy position. It will have a stop loss of 1000 points, and it will have a take profit of 500 points above the ask price.

And now we want to call a function that will use the name Check trailing stop, and we deliver the ask price as a parameter here. This is the end of the Ontick function, and now we will create the function with the name check trailing stop. It needs the ask price as a parameter, and the first thing in the new function will be to set the desired stop loss to 150 points. So we create a double variable called Sl for stop loss. This expression will set it 150 points below the Ask Price and we use normalize double and underline digits to get the right value for a three digit or a five digit currency pair.

Now we want to check all open positions for the current symbol. By counting through all the positions. And to get the position symbol, we use the function position get symbol for the current position. And if the symbol on the chart equals the symbol of our position, we need to get the ticket number of this position. That will be assigned to a variable called Position ticket and we can get it by using position get integer for position underline ticket. Now let’s define a double variable with the name current stop loss. That will get the current position stop loss by using Position get double and the expression position underline SL.

If you Press F one on your keyboard while this expression is marked, you will see that position underline SL will deliver the stop loss level of an opened position and position underline TP will deliver the profit level. And if the current stop loss is below 150 points from the current ask price, remember, we have defined the 150 points for the SL variable in this line, so if the current stop loss is below the defined stop loss, we want to modify the stop loss by ten points that is done by using trade dot position modify for the current position ticket and we will use the current stop loss and add ten points to it.

Okay, let’s close all the open brackets and click on the compile button here, and that did work without any errors. So now we can click on the button here or press F4 to go back to MetaTrader. And in MetaTrader, you want to click on View, Strategy Tester or press Control and R on your keyboard. And in the strategy tester, you want to select the advanced trailing Stop ex5 file.

Advanced Stochastic Scalper Mt5

Advanced Stochastic Scalper Mt5, MQL5 Tutorial – Advanced Trailing Stop.

Trading Chance – The Euro A Live Example A Trade For Big Profits

This preparation might suggest the difference in between excellent revenue and excellent loss. If not updates are being made, then it’s buyer beware. The outer bands can be used for contrary positions or to bank earnings.

MQL5 Tutorial – Advanced Trailing Stop, Watch most shared updated videos about Advanced Stochastic Scalper Mt5.

Online Forex Trading – An Easy Effective Method Making Huge Profits

Stock trading can make you a great deal of cash if done in a disciplined manner. So get out there and try it out. The higher it ascends above the 0 line the more powerful the uptrend. What were these basic analysts missing out on?

In these rather unsure financial times, and with the unpredictable nature of the stock market today, you might be questioning whether you need to take out and head towards some other type of financial investment, or you might be looking for a much better, more dependable stock trading indicator. Moving your money to FOREX is not the response; it is time to hang in there and get your hands on a fantastic stock trading indicator. Attempt this now: Invest in Stock Attack 2.0 stock exchange software application.

These are the long term investments that you do not rush Stochastic Trading into. This is where you take your time evaluating a great spot with resistance and assistance to make a big slide in profit.

The fact is you don’t need to be frightened with the idea of day trading. The charm of day trading is that you don’t need to have a Masters degree in Business from Harvard to earn money doing this. Successful day traders consist of a great deal of “Typical Joes” like you and me. There are loads of successful day traders out there who had a really bumpy ride simply finishing high school.

Many indications are available in order to identify Stochastic Trading the trends of the market. The most effective indicator is the ‘moving average’. Two moving typical indicators ought to be utilised one fast and another sluggish. Traders wait until the fast one crosses over or below the slower one. This system is likewise known as the “moving typical crossover” system.

The hard part about forex Stochastic Trading is not a lot getting a method – however believing in it and trading it with discipline. , if you don’t trade with discipline you will lose and you should have self-confidence to get discipline..

However don’t believe it’s going to be a breeze either. Don’t expect t be a millionaire over night, since that’s simply not sensible. You do require to make the effort to learn more about technical analysis. By technical analysis, I don’t suggest tossing a couple of stochastic indicators on your charts, and have them inform you what to do. Unfortunately, that’s what a lot of traders think technical analysis is.

Remember, if your trading stocks, do your research and share a plan and adhere to it. Do not forget to secure earnings. If done in a disciplined way, stock trading can make you a lot of money. So get out there and attempt it out.

With this plan, you can trade on your own schedule and exploit rate changes in the market. In common with essentially all aspects of life practice is the essential to getting all 4 elements collaborating.

If you are searching unique and entertaining comparisons relevant with Advanced Stochastic Scalper Mt5, and Forex Trading Strategy, Technical Analysis Question, Forex Trading Signals please join our email alerts service totally free.

Enjoyed this video?
"No Thanks. Please Close This Box!"