We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.
BOOK YOUR FREE STRATEGY SESSION NOW >>RBOB Gasoline is one of the most commonly traded energy futures.
This market shows a propensity to be trend-driven and is therefore suitable to be traded with trend-following strategies.
In this video, we explain all the rules for creating a very promising trading system for this future based precisely on the trend-following approach!
We'll also unveil the strategy code and show how to create it in an "automated" way using our proprietary software (Composer) that allows you to generate trading system scripts by simply setting some settings and parameters, WITHOUT the need for programming. And best of all, the resulting code can be pasted directly into MultiCharts, where we can backtest, optimize and trade it.
In short, a video not to be missed!
By watching it, you'll discover:
How to create a trend-following strategy on gasoline futures (with open-source code)
How to generate the script with our Composer software
How to import and use the code in MultiCharts
Enjoy the video! 😎
Introduction
Hey everyone, today we’re going to be talking about how to develop a trend-following strategy for RBOB Gasoline.
Okay, so let's start! Here's a 30-minute chart of the RBOB Gasoline future. We intend to buy and sell in favor of the trend on the previous session's highs and lows, which are these, for example, plotted in red and green, and they will be the entry levels of the strategy corresponding to this point here at the bottom, which is the low of the previous session, and this other point here at the top, which is the high of the previous session. And on these levels, we'll send our orders.
The Rules of the Strategy
So, the entry rules are to enter long, as mentioned, when the previous session's high is exceeded and then short when the previous session’s low is exceeded.
The session on this market starts at 6 p.m. and ends at 5 p.m. the following day, New York time.
The time window, namely the trading window in which we'll place our orders, will start half an hour after the start of the session and end half an hour before the end of the session, always of course at New York exchange time.
At most, the strategy will only be able to make one entry per day. This means that if we've entered for example long, then we won't be able to enter short until the next day.
Also, since this is a multiday strategy, it will keep positions open beyond the end of the session, for a maximum of five days.
Lastly, we have the standard Stop Loss and Take Profit exits, set at $1,500 and $5,000, respectively.
The Composer software
At this point, once all the rules of the strategy are known, we can proceed to create the code. To do this we'll use our proprietary software called Composer, which, in just a few clicks, will provide us with the script that we'll then directly use in MultiCharts.
So, we're going to set up all the various inputs that we described earlier. The trigger will be the Trendfollower breakout on N sessions ago. How many sessions? One session, in this case.
As mentioned previously, the time window will start at 6:30 pm and end at 4:30 pm without a break. Long and short. And we said to limit entries to a maximum of one per day.
Let's now go through the exits, very quickly. As you see here you can set whether the strategy should be intraday or multiday. We decided to be at market for five sessions, so let's go and set the number of sessions here.
And we also decided to keep the Stop loss active at $1,500. We didn't use the Breakeven. And the Take profit is at $5,000.
There, at this point we can click on "Generate Code" and in a very few seconds the Composer… It has already finished processing, and in the output column, we'll see the results.
We have our code all done and we can safely copy and paste it inside the Power Language Editor.
The Script
By simply pasting and compiling this strategy, we can now go and evaluate the results - here I had already uploaded it - and optimize all the various inputs.
The Results
Here are the results. Now the strategy has been uploaded. Let's go through the results starting with the average trade, which as we know is one of the most important values when reading the performance report, which stands at about $146.
A good proportion between long trades and short trades is very important when developing commodities. And the equity line also takes on a shape that certainly looks nice, considering that this strategy hasn't yet been optimized and so the optimal points might even deviate a bit from what we set in the Composer.
Stoploss Optimization
So, what we're going to do now is to optimize, for example, one of the many parameters that the strategy has. For example, the stop loss, from $500 to $3,000, in steps of $100.
So, we initially set a stop loss at $1,500, but let's see if by setting a slightly larger or perhaps slightly smaller Stop loss the results can improve.
Let's get the optimization going. And here are our results. What we saw before were the results with a Stop loss at $1,500, and we had a net profit of about $258,000 and a drawdown of $42,000, and as mentioned the $146 average trade.
What can be noticed, however, is that as the Stop loss increases, the Net profit of this strategy also increases, and by the way, in some cases, the Drawdown also decreases.
So, we certainly could think about using a slightly larger stop loss for this market compared to the one we had set.
Let's try to set it t $2,400, which seems to me a very good value and also has an excellent Net profit.
Let's go and set $2,400 as the stop loss and see how the results change. Here, in this case, you can see this trade before was unlucky and was immediately closed, practically on the next bar. Now it even reaches the Take profit.
And the strategy report... The equity line has an even better shape than before, an indication that this strategy can be further improved and optimized.
So, guys, give it a try too!
If there's someone among you who is interested in the world of systematic trading, I suggest that you go and click the link in the description of this video. From there you can watch a video by Andrea Unger, get our best-selling book by just covering the shipping costs or even book a free call with a member of our team.
If you liked the video, please be sure to leave a Like, subscribe to our channel and click on the notification bell so you can stay updated on the release of all our new content.
And with that, goodbye everyone, I will see you next time!
We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.
BOOK YOUR FREE STRATEGY SESSION NOW >>Andrea Unger here and I help retail traders to improve their trading, scientifically. I went from being a cog in the machine in a multinational company to the only 4-Time World Trading Champion in a little more than 10 years.
I've been a professional trader since 2001 and in 2008 I became World Champion using just 4 automated trading systems.
In 2015 I founded Unger Academy, where I teach my method of developing effecting trading strategies: a scientific, replicable and universal method, based on numbers and statistics, not hunches, which led me and my students to become Champions again and again.
Now I'm here to help you learn how to develop your own strategies, autonomously. This channel will help you improve your trading, know the markets better, and apply the scientific method to financial markets.
Becoming a trader is harder than you think, but if you have passion, will, and sufficient capital, you'll learn how to code and develop effective strategies, manage risk, and diversify a portfolio of trading systems to greatly improve your chances of becoming successful.