avatarStrategyPro

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2811

Abstract

on the weekend, so I have put a condition that I <b>let me out on Friday</b> afternoon before the close of the markets …</p><figure id="376a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*oRPv2_cPhPfIGqGfbr-PNw.png"><figcaption></figcaption></figure><p id="7501">these are the results of optimizing the Friday exit time..</p><figure id="8631"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ytdo9YmJjTXV1BRFHeXhQg.png"><figcaption></figcaption></figure><p id="5a66"><i>Here are the results of the system:</i></p><figure id="3d52"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Twq_IUUNlAKNHbsU1EBpDA.png"><figcaption></figcaption></figure><p id="6409">Once all the time exits have been added, it’s time to add a <b>stoploss</b>, for my custom I always use a <b>monetary</b> stoploss.</p><p id="f230">Once added I optimize the stop loss value, in the end I chose a stoploss of: <b>$ 2300</b>, these are the results:</p><figure id="9953"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*hwBc83cBzHkWCOGLF4klNw.png"><figcaption></figcaption></figure><p id="e527">The basic system is now complete but the performances are not satisfying me yet, so I decide to apply my market patterns.</p><p id="e990">As a first test I decide to use <b>my patterns</b>, below they have already been selected, condition 0 I do not apply any pattern, condition 1 I apply the patterns on the timeframe at 15 minutes, conditions 2, 3, 4 I apply the patterns at the timeframe at 480m.</p><figure id="f177"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*W2rVYWwHVDuhKEdh_BXhmQ.png"><figcaption></figcaption></figure><p id="88c2"><i>Here are the pattern performances:</i></p><figure id="c856"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3eNdcG4p7LhYApvsbPe2Zw.png"><figcaption></figcaption></figure><p id="faf1">Since there were still too many trades I decide to use a <b>volatility filter</b> based on the<b> Average True Range</b> on data2 (480 min). That is to say:</p><p id="6613">AvgTrueRange (last bar) </p><p id="8c82"><b>= Market compression</b></p><p id="f941">AvgTrueRange (last bar)> AvgTrueRange (number of bars to be optimized)</p><p id="06d6"><b>= Market expansion</b></p><p id="e9f4">Now is the time to optimize our volatility filter for all 4 market patterns I have selected to create our strategies:</p><p id="d512"><b>PATTERN 1</b></p><p id="948f">For this pattern, the market compression was found to be effective, here are the parameters I chose based also on their stability in optimization. In this example, the first column indicates the length of the AvgTrueRange.</p><figure id="c681"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*InWdL97Vw4gAIrQQXRixoA.png"><figcaption>long

Options

</figcaption></figure><figure id="f4c7"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*EibJ4UHgVNopkBkghQabXA.png"><figcaption>short</figcaption></figure><p id="06b5"><b>PATTERN 2</b></p><p id="182b">For this pattern the compression was found to be better only for the short side, for the long side I opted for a market expansion.</p><figure id="d7ff"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*uZ6mFWwWwejcV9o_GmTyVg.png"><figcaption>long</figcaption></figure><figure id="6df1"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Gxn7_9l9hgyl7aaDwo_tkA.png"><figcaption>short</figcaption></figure><p id="a0ef"><b>PATTERN 3</b></p><p id="c8be">Also for this pattern, the market compression was very positive for the system.</p><figure id="1d13"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*HjXm_bLrBSQvQoNwZ7o5qA.png"><figcaption>long</figcaption></figure><figure id="511f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*O0Wz6B20eHCOpiXhAhYMcw.png"><figcaption>short</figcaption></figure><p id="5fc9"><b>PATTERN 4</b></p><p id="5539">Finally, also for this pattern, the market compression was very positive for the system.</p><figure id="8cdf"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*8Px93vSbQFfVDMHnGLjPog.png"><figcaption>long</figcaption></figure><figure id="e007"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*AEaHpNZACvjnH20qmnQBiA.png"><figcaption>short</figcaption></figure><p id="c6e9">Finite systems! Thanks to the simple analysis of the underlying in question, I started from a very simple Bias engine idea and then created 4 different profitable systems in a few hours!</p><p id="3fcb">Below are the performances of the 4 systems in the<b> portfolio</b>, portfolio equity <b>blue</b> line, other single systems lines.</p><figure id="825e"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3ms3iq8-8gnSZsUmzZNHpQ.png"><figcaption></figcaption></figure><figure id="895f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*mg_fHl-nxdlKpLYNUnJDCA.png"><figcaption></figcaption></figure><figure id="a9ed"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*a_4mXzlVSLE_SxqkHhsZjw.png"><figcaption></figcaption></figure><p id="f86d"><b><i>Follow me on 👉 <a href="https://www.linkedin.com/in/armando-lo-conte-83a4a8129/">LinkedIn</a></i></b></p><p id="9f83"><b><i>See the list of all my articles comfortably from 👉 <a href="https://algo-trading.medium.com/collection-of-articles-everything-you-want-to-know-divided-into-categories-d05c05c11fa9">here</a></i></b></p><p id="c935"><b><i>Financial advice and ideas? Look here 👉 <a href="https://medium.com/@ArmandoLoConte">Armando Lo Conte</a></i></b></p></article></body>

Crude Oil Futures Strategies

How I created 4 automatic strategies starting from a study

I started my study by calculating the cumulative returns for each trading hour of the Futures on Crude Oil, so I used a 15-year history and a 60-minute TimeFrame based on the Exchange schedule.

I wrote a simple strategy that enters at the beginning of the bar and exits when it closes, then I extracted the data and loaded it on the data analysis software I use.

Here are the results:

As can be seen in the screen, there is a strong bearish bias that begins in the late afternoon and ends in the early hours of the next day; as well as a rise in prices from late morning to late afternoon.

As a timeframe for this system I decided to use the 15 minutes and as the second timeframe one at 480 minutes to better filter the results in the next phase.

So I started writing this simple bias: Short from 19:00 to 12:00, long from 12:00 to 19:00

Here is the code:

Results:

Now I start optimizing time entries and exits for the long and short side.

Long side:

Entry Time
Exit Time

Short side

Entry Time
Exit Time

Here are the performances:

Since it is an Intraday system I have decided not to keep the positions open on the weekend, so I have put a condition that I let me out on Friday afternoon before the close of the markets …

these are the results of optimizing the Friday exit time..

Here are the results of the system:

Once all the time exits have been added, it’s time to add a stoploss, for my custom I always use a monetary stoploss.

Once added I optimize the stop loss value, in the end I chose a stoploss of: $ 2300, these are the results:

The basic system is now complete but the performances are not satisfying me yet, so I decide to apply my market patterns.

As a first test I decide to use my patterns, below they have already been selected, condition 0 I do not apply any pattern, condition 1 I apply the patterns on the timeframe at 15 minutes, conditions 2, 3, 4 I apply the patterns at the timeframe at 480m.

Here are the pattern performances:

Since there were still too many trades I decide to use a volatility filter based on the Average True Range on data2 (480 min). That is to say:

AvgTrueRange (last bar)

= Market compression

AvgTrueRange (last bar)> AvgTrueRange (number of bars to be optimized)

= Market expansion

Now is the time to optimize our volatility filter for all 4 market patterns I have selected to create our strategies:

PATTERN 1

For this pattern, the market compression was found to be effective, here are the parameters I chose based also on their stability in optimization. In this example, the first column indicates the length of the AvgTrueRange.

long
short

PATTERN 2

For this pattern the compression was found to be better only for the short side, for the long side I opted for a market expansion.

long
short

PATTERN 3

Also for this pattern, the market compression was very positive for the system.

long
short

PATTERN 4

Finally, also for this pattern, the market compression was very positive for the system.

long
short

Finite systems! Thanks to the simple analysis of the underlying in question, I started from a very simple Bias engine idea and then created 4 different profitable systems in a few hours!

Below are the performances of the 4 systems in the portfolio, portfolio equity blue line, other single systems lines.

Follow me on 👉 LinkedIn

See the list of all my articles comfortably from 👉 here

Financial advice and ideas? Look here 👉 Armando Lo Conte

Trading
Trading System
Trading Tips
Algorithmic Trading
Trading Ideas
Recommended from ReadMedium