Here's a very simple scalping strategy using the Fractals Indicator by Bill Williams. The Buy fractal is formed by a sequence of at least 5 bars where the lowest low is in the middle. The Sell fractal is formed by a sequence of at least 5 bars where the highest high is in the middle. Williams Fractals take advantage of the fact that many markets spend a majority of their time in ranges.
QuantConnect Moderator Edit:
Please read this thread to its end. It was found that Accord.Extensions is not supported by Accord. After spreads have been incorporated, the performance dropped massively to an 80% loss.
Roberto Terpilowski
Is this after slippage and commission?
Stephen Oehler
This also assumes a $0 fee model. Very cool model, though :-)
Zedrick Gilo
I'm really new to this, but how would you attach fee's to this?
Alexandre Catarino
Hi, Hector,
Marcus set zero fees with code line #18:
Securities[symbol].FeeModel = new ConstantFeeModel(0.0m);
You can attach fees in three ways:
Securities[symbol].FeeModel = new ConstantFeeModel(1.0m);
Zedrick Gilo
I was able to add the fee's. Thank you.
Thomas Howe
Zedrick Gilo
Is there a way to add foxre commission per trade?
Stefano Raggi
@Hector, you can use the FxcmFeeModel to use real commissions applied by FXCM with this line:
Securities[symbol].FeeModel = new FxcmFeeModel();
Zedrick Gilo
Awesome! Thank you so much!
Deval Keralia
So i tried implementing this strategy into my risk control and volatility framework to see how it perfoms. I used two types of exit signals, First was the one which was originally implemented in the post and the second is the profit target exit signal with a target ratio of about 0.125 with a risk per trade of $40. Also I am using a portfolio of about 4 symbols rather than just one.
The only problem I think with this strategy is that it trades a lot which really amps up the fees a lot. If we could find a way for this strategy to trade "less frequently" then we can definitely make this strategy profitable. Currently I am using a constant fee model of $0.04 just so we have some kind of a fee applied inorder to see how the risk control model work with this.
I am attaching both the results below with the two exit signals.
First is the one with the profit target exit signal.
I would love to know what the others think about it. :)
Felix Dietrich
Liz Bodin
can you explain the trading rules to enter and exit the trades? a 5 bar high fractal is nothing more than a swing high with 2 lower highs to the right and left of the swing high, as is the 5 bar low fractal, a swing low, with 2 higher lows to the right and left of the swing low. NOW HOW DO YOU ENTER A TRADE, WHAT LOGIC DETERMINES THE ENTRY, AND THE EXIT. ???
Mike Pod
Liz Bodin
no you are not missing anything, but if you can can you explain the entry and exit logic for the system. Can the developer at least help me in that regard?
Mike Pod
LIz,
The logic is simple and straightforward. Look back and make the bar 3 bars back (as defined, or the middle bar) is the lowest or highest. It is looking for a reversal within two bars. I just don't understand how the order is executed on the price of the current bar.
Liz Bodin
e.g., you have a swing high with a strength of 2, (rename it a 5 bar fractal high), that is, a high with 2 lower highs to the right and left, when you complete the pattern, am I assuming you then enter short at the current bars close? converse for a long.
therefore you have a reversal system, long short long etc. Does the code verify this? and what interval is being tested, daily, intraday?
Zedrick Gilo
I believe it's doing daily per minute.
John Leak
John Leak
John Leak
Marcus Ording
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!