Backtesting Settings For the Logical Trading Indicator V.1Since creating the Logical Trading Indicator, my trading game has changed in a big and positive way. But I have been curious as to how I can make an automated strategy with it and how much it makes. The Logical Trading Indicator has many different signals and alerts that you can use to create your own trading strategies that work best for your trading plan.
Over the weekend, I have been tinkering around with the base strategy of buy when I get a buy signal and sell when i get a sell signal. I have played around with both a long and short strategy mainly focusing on the BTCUSD pairing. I am really doing this to help me find the best settings possible for each time frame and letting the strategy do the backtesting for me. This really helps me to figure out how it does over the past year or so. So far, at least for BTC, a LONG only strategy has yielded the best results. Mainly because I couldn't get it to fire shorts the way I wanted it to. This is where machines still need some human guidance, as well as your trades, haha.
Dialing It In
What I am doing is going into different timeframes and finding the best settings for the ATR multiple and length in combination with basis length and the long period moving average. I have been recording the results primarily on the 5 minute as well as the 1 HR and 4 HR time frames because those are the main time frames I focus on.
I have played around with different variations of functions, but TradingView can't seem to get things to fire on the strategy the same way I can get the main indicator to fire. But based on this, I set the strategy to a simple LONG only strategy where it buys when you get a BUY signal and then closes when you get a SELL signal, with the addition of a stop loss function that let's me set a stop loss percentage to provide some additional risk management to help with the drawdown percentage.
In this backtest, the strategy was not taking the 'Take Profit' signals into account, or when I tried to include them in the logic, they weren't firing properly, so I kept it simple with just the BUY and SELL signals with a stop loss. If you used the built in take profit signals, you can do even better than these results.
On the 5 minute time frame, the most profitable settings ended up being:
ATR Multiple: 3
ATR Length: 1
Basis Length: 15 EMA
Long Period Moving Average: 50 SMA
These settings yielded over 100% profit for the backtesting period, which is about a year.
For the 1 HR time frame, the winning settings were:
ATR Multiple: 3
ATR Length: 6
Basis Length: 20 EMA
Long Period Moving Average: 100 SMA
These settings yielded over 200% profit for the backtesting period with almost 60% win rate! Again, you could maximize this even more by utilizing the take profit signals and using short trades when the trend is right and if you are trading on a futures exchange. I have been doing more spot trading on DEXs lately, so I have been trading long only lately.
The Importance of Backtesting
I cannot stress this enough, you have to back test your strategies to make sure they are going to be profitable. This can be done manually by going back in time on the charts and finding all of your signals and seeing if it was profitable, or you can create your own strategy like this using TradingView's Pinescript and let the program do the backtesting for you.
However you do your backtesting, just make sure it gets done! You don't want to just think an indicator or a strategy works, you want to KNOW it works! If not, you could be throwing your money down the drain.
This is Only A Test- But Great For Info Gathering
I am only using this strategy for my own backtesting purposes, not publishing it. I simply used one part of the strategy that is built into the Logical Trading Indicator, and it honestly doesn't properly utilize multiple options for exits as far as the automated strategy goes. I know that if I use these settings, but also use my built in take profit signals, I can do much better than these results are showing.
What is great about this is you can see the performance and find trades that you wouldn't have taken in the first place, or entries and exits that could have been done better by trading manually. For example, after looking at the list of trades, I saw several trades I would have either gotten out of for better profit using the take profit signals, or trades I wouldn't have taken in the first place due to consolidation or accounting for the larger trend.
When trying to program some of the other functions from the main indicator, TradingView would freak out on me a bit and not want to provide any results, or results that just didn't make any sense. But that is all a part of the process. It helps you figure out that the machines don't always have it right, and that having just a bit of 'human' in your trades can make your performance even better than the strategy suggests!
Living That Trader Life
This is the life of a good trader, at least in my opinion. Based on my trading plan, I do not trade on the weekends, even though the crypto markets are open, it isn't always the best time to trade. I like to take this time to go over my trading journal to see where I can improve, perfect my strategies, and hone in on the things I need to work on to get better.
What this development work does for me is show me that automated trading is great, but with the combination of a great indicator that can produce trading alerts, and my own trader's intuition, I can give the markets a serious beating and come out with some amazing gains, as long as I stick to the plan, as well as trade manually with the signals! This helps me keep the emotions out of the game and let's me use the data with the correct settings to make the best decisions possible in my trades for the biggest gains! So get out there and do some backtesting on your favorite strategies to see if you really are trading logically!
Settings
How to guide ? Hide INPUT values of indicators From ScreenHide INPUT values of indicators From Screen
There is a very common cluttering issue that can happen when adding indicators.
All input values are shown on the chart next to the indicator name, which is not really helpful in most of the cases. The values are input settings selected for the indicator, which is of very little use to just see selected values. So if you have long strings as input, or multiple inputs, you will see a long line of text, even hiding the indicator name itself. Further it blocks the chart and looks very bad when taking screenshots.
Fortunately there is an option available from trading view itself, that many people are unaware of. This option enables you to hide all input values, leaving just the indicator name.
What Are The Best Indicator Settings & Timeframes?Timeframes and technical indicator settings are ubiquitous concepts to technical analysts, two things that they will have to interact with at some point in point. For certain traders, they make part of the million-dollar questions:
"What is the best timeframe to use?"
"What are the best indicator settings to use?"
Where "best" refers to the timeframe/settings that lead to the most profits. Both questions are very interesting and very difficult to answer, yet traders have tried to answer both questions.
1. What Is The Best Timeframe To Use?
Timeframes determine the frequency at which prices are plotted on a chart and can range from 1 second to 1 month. We can notice that price charts tend to be similar to each other from one timeframe to another, having the same irregular aspect and the same patterns, this explains the fractal nature of market prices, where shorter-term variations make up of longer-term variations found in a higher time-frame.
Based on this particularity, methods used to determine the start/end of a trend can be the same regardless of the selected time-frame, as such traders could choose a time-frame based on the trend they want to trade, for example, daily/weekly timeframes could be used to trade primary trends while other could use intraday timeframes to trade intraday trends, note that it is still possible to trade a specific trend by using any time-frame you want, however using a timeframe that is too low for trading long term trends might result in an excess of parasitic information while using a high timeframe for trading short term trends will result in a lack of information.
It is important to note that lower time-frames will return price change of lower amplitude, as such trading the variations of a lower timeframe will make a trader more affected by frictional processes, particularly frictional costs, as such trading lower time-frames aggressively might require more precision, which is why beginner traders should stick with higher time-frames.
So "the best timeframe to use" should be chosen based on the trend the trader wants to trade, with a timeframe giving the right amount of information to trade the target trend optimally. Your target trend will depend on your trader profile (risk aversion, trading horizon...etc).
1.1 Multi Timeframe Analysis
Some traders might use multiple timeframes, such practice is called multi-timeframe analysis and consists of getting entries in a certain time-frame while using the trend of a higher timeframe for confirmation. There are various methods in order to choose both timeframes, one consisting of choosing a timeframe such that the trend of the lower one is an impulse of the trend of the higher timeframe.
2. Best Technical Indicators Settings
When using technical indicators, reducing whipsaw trades often introduce worse decision timing, finding settings that minimize whipsaw trades while keeping an acceptable amount of lag is not a simple task.
Most technical indicators have user settings, these can be numerical, literal, or Boolean and allows traders to change the output of the indicator. In general, the main setting of a technical indicator allows making decisions over longer-term price variations, as such traders should use indicator settings in order to catch variations of interest like one would do when selecting a timeframe, however, technical indicator settings often allow for a greater degree of manipulation, and can have a wider range of values, as such setting selection is often conducted differently.
2.2 Indicator Settings From Optimization
When using technical indicators to generate entry rules it is common to select the settings that yield the most profits, various methods exist in order to achieve optimization, certain software will use brute force by backtesting a strategy for every indicator setting. It is also possible to use more advanced procedures such as genetic algorithms (GA).
GA's are outside the scope of this post but simply put GA's are a search algorithm mimicking natural selection and are particularly suitable for multi-parameter optimization problems. When using a GA the setting is as genes in a
chromosome.
Such a selection method has some limitations, the most obvious being that optimal settings might change over time, rending useless the process of optimization. Optimization can also take a large amount of time when done over large datasets or when using a large combination of indicator settings, it might be more interesting to analyze the optimized settings of a technical indicator over time and try to find a relationship with market prices.
2.3 Dominant Cycle Period For Setting Selection
Certain technical analysts have made the hypothesis that the dominant cycle period should be used as a setting for technical indicators instead of a fixed value, this method can be seen used a lot in J. Elhers technical indicators. Most technical indicators using the dominant period as a setting are bandpass filters, which preserve frequencies close to the dominant one.
There are several limitations to such a selection method, first, it depends a lot on the accuracy and speed of the dominant cycle period detection algorithm used, the noisy nature of the price makes it extremely difficult to measure the dominant period accurately and in a timely manner, in general, more accurate methods will have more lag as a result. Another downside is that it is not a universal solution, technical indicators can process market price differently.
3. Conclusion
From the two questions highlighted at the start of this post the one involving technical indicators remains the most challenging one to answer, which is often the case with "what is the best..." kind of questions. What is certain is that there isn't a universal setting for each indicator, certain settings might be more adapted to specific market conditions (such as ranging or trending conditions), and the presence of a setting in itself will always mean that interaction will occur at some point, as such recommending an indicator setting or timeframe must be done with a significant rationale.
The problem of the best technical indicator settings offer a great challenge for any technical indicator developer, but it is important for the common traders to lose some focus about them, while important, these should not be adjusted in opposition to your trader profile , having a well-defined trader profile will help you adjust these settings more effectively, as such a reasonable answer to "what are the best timeframe/indicator settings?" could be "the ones that are adapted to your trader profile".
Indicators Input Window Length - Problems And SolutionsIntroduction
Most technical indicators possesses a user defined input window length, this input affect the indicator output and for a long time, have been the cause of many innovations in technical analysis.
In this post i want to discuss the effects and particularities of indicators inputs window length, the challenges they introduce in trading and their effect when paired with machine learning forecasting models, i hope this post will be easy to read, let me know if you had difficulties understanding it.
Speed And Efficiency Problems
An input window length can involve the number of data processed by the indicator, therefore higher window length's will process more data, which result in a slower computation time, therefore in high-frequency/algorithmic trading where response time matter, maximizing the profitability might be made at the cost of the indicator response time, and even if computerized trading has been praised for its speed, small lag times can actually affect your strategy, therefore one might enter a trade at a different value than the targeted price.
Note : High frequency trading (hft) is a commonly mistaken term, one might believe that hft require the trader to open and close a large number of trades in a short amount of time, in reality hft is related to the "rate at which data is processed".
Solution - Efficient Data Processing
Solutions have been proposed in order to make certain tools more efficient. For example the simple moving average is a common tool that is the basis of many other indicators, its calculation involve summing the length last data points and diving this sum by length . In signal processing, such tool require what is called "memory", the data points must be stored in order for them to be processed, this is extremely inefficient and slow, therefore alternatives have been proposed, one of them is still mainly used in technical analysis today and is called the exponential moving average (ema), the process of computing an exponential moving average is called exponential averaging, and has the form of :
ema = sc*input+(1-sc)*(past ema value)
where sc is called the smoothing constant where 1 > sc > 0 . We only need 2 data values in order to perform this computation, lets denote a moving average of period length sma(input,length) , we can estimate it using exponential averaging with sc = 2/(length+1) . The computation time of the exponential moving average is way lower than the one of the sma . This is the most elegant and efficient estimation of the simple moving average.
The exponential moving average is the simplest "IIR Filter", or infinite response filter, those filters are as well extremely efficient since they use recursion. Exponential averaging is also the core of many adaptive indicators. In my experience, recursion will always let you create extremely efficient tools.
Window Length And Optimization Problems
Optimization is a branch of mathematics that help us find the best parameters in order to maximize/minimize a certain function, and thanks to computers this process can be made faster. Optimizing technical indicators during backtesting involve finding the input window length (set of inputs if there are more than 1 input) that maximize the profit of a strategy.
The most common approach is brute forcing, in which we test every indicator inputs window length combination and keep the one that yield the best results. However optimization is still computationally intensive, having 2 indicators already involve a high number of combinations. This is why it is important to select a low number of indicators for your strategy. But then other problems arise, the best input window length (set of inputs) might change in the future. This is due to the fact the market price is non-stationary and one of the reasons technical indicators are looked down.
In order to deal with this problem, we can propose the following solutions :
Use indicators/Information with no input window length -> Vwap/Volume/True Range/Cumulative Mean...etc.
Study the relationship between the optimal input window length and price evolution -> Regression analysis
Forecast the optimal input window length -> Forecasting
The last two are extremely inefficient, kinda nightmarish, and would be time consuming if one use a serious backtesting procedure. However the first solution is still appealing and might actually provide a efficient result.
Machine Learning Forecasting - Performance And Technical indicators Input Window Length Dependency
Technical indicators outputs can be used as inputs for machine learning algorithms. We could think that we also need to optimize the input window length of the indicators when using machine learning (which would lead to high computations time, machine learning already involve optimization of a high number of parameters), however a research paper named "Forecasting price movements using technical indicators: Investigating the impact of varying input window length" by Yauheniya Shynkevicha, T.M. McGinnitya, Sonya A. Colemana, Ammar Belatrechec and Yuhua Li highlight an interesting phenomenon, the abstract tell us that :
"The highest prediction performance is observed when the input window length is approximately equal to the forecast horizon"
In short, if you want to forecast market price 14 step ahead with a machine learning model, you should use indicators with input window length approximately equal to 14 as inputs for the model in order to get the best performance. This would allow to skip a lot of optimizations processes regarding the technical indicators used in the model. They used 3 different type of ML algorithms, support vector machine (svm) , adversarial neural networks (ann) and k nearest neighboring (knn) , which reinforce their conclusion.
In the paper, we can see something interesting with the indicators they selected as inputs, they used : A simple moving average, an exponential moving average, the average true range, the Average Directional Movement Index, CCI, ROC, RSI, %R, stochastic oscillator.
First thing we can see is that they used the exponential moving average instead of the wilder moving average for certain calculations, which i think is a good choice. We can also see they used many indicators outputting the same kind of information, in this case we often talk about "Multicollinearity", for example :
The CCI, ROC, RSI, %R, Stochastic output similar information, all remove the trend in the price, the CCI and ROC are both centered around 0 and the %R, RSI and stochastic oscillator around 50. The SMA and EMA also output similar information.
In technical analysis this practice is often discouraged since the indicators will output the same kind of information, this lead to redundancy. However such practice has been seen a lot in machine learning models using technical indicators. Maybe that a higher amount of multicollinearity between indicators allow to strengthen the relationship between the forecast horizon and the indicators input window length.
Conclusion
We talked (a lot) about indicator inputs window length, what problems they cause us and how we can find solutions to those problems. Also we have seen that the forecasting performance of ML models can be higher when they use indicators outputs with input window length equal to the forecasting horizon. This can make to make the process of forecasting financial market price with ML models using technical indicators more efficient.
ML is a recurring subject in financial forecasting, those algorithms offer the hope to make technical indicators more useful, and indeed, technical indicators and ML models can benefits from each others, however it is sad to observe that classical indicators are mainly used instead of newer ones, but its also encouraging in the sense that more research can be done, using newer material/procedures.
Thanks for reading !
EURJPY 1HForeverFX Here With Our First Analyses; Please Be So Kind And To Give Us Some Love. Support & Resistance Levels are shown and if you place this trade I hope you enjoy, Yen news is out Thursday and it's looking positive for the interest. We are predicting a strong Yen of 2019 the year of the emerging markets! Especially when the Olympics is hosted there. That's not all too relevant as this is on the 1H timeframe, though. Something definitely to take into consideration though.
How I trade majority of the marketsFirst off, I would click the megaphone and hit make it yours so your chart will match mine.
I've put quite a bit of time studying various methods and indicators. These are what I trade with day in and day out. If you just used the indicators at the bottom, you would be a successful trader with proper risk management. In ranging markets when the Shaff trend line crosses the hull moving average at the bottom, long. At the top, short. In bull markets, add to your position at the bottom cross and take profit at the top. Reverse that for bear markets.
I use the middle keltner line for confluence. Example: In a bearish market I will be looking to add to a short position if price is moving up from the bottom range of the Bollinger Band/Keltner channel range up to the middle line and if the Shaff trend line is nearing the top and crosses the hull ma, I enter a position with confidence.
In flat or ranging markets I look for separation of the top and bottom channels of the Bollinger Band/Keltner channels to place bids or asks as price will eventually go there. Long bottom, short top. Risk management is especially important in these types of trades as flat markets can become trending very rapidly and in that case you just switch your bias to whatever trend the market is heading and follow the rules.
Remember. The markets are here to transfer money from the impatient to the patient. Think ahead and never have to react.
ITX-LONGTERM VIEW 2k18 - BUYHey there!
My idea behind this chart is, the possibility to profit of an long term trade, by buying on the lowest of it's points.
Since the low of the ITX Chart is yet by approx. 26,7-27,9, it may be the best Idea to buy at These Points and sell at About the end of the year, by beginning of the winter Season. ( When Inditex companies Show their first buyable items for the winter Season).
DM me for further Information.
Best Regards,
Egzon Shabani
ETH Ichi analysisETH found short term support on 2 hr cloud, and got rejected by the Kijun (red line). A break of TK could give a small boost and if support holds, continue to 1000 $. Still not very strong though. Another rejection at 2 hr TK, will bring ETH down to test cloud support. If that is lost the momentum downwards could increase. In other words, still a no-trade zone. The 4 hr Kijun is still around 600 $ and could provide a bounce for a bullish move. A strong Kijun bounce is a buy signal. We will probably test that again.
Key levels: 600, 580, 550, 530 $.
Trade carefully, this is not advice.