Hi, want to share a Simple Strategy. With a very simple Buy- and Exitcondition. Its just a Long strategy on a 15min timeframe (Tickbased, Spread:1). It also works with other settings on a 1h timeframe. I come to this Strtegy by playing around with a Web based Expertadvisor-Generator for MT4/5, and many tests. If someone had an idea to make it a little bit better, it wud be very nice. 🙂
If you paste the code directly here, one could have a look at the code. This is easier for most than downloading an ITF.
JSParticipant
Senior
One of the big pitfalls with any system is of course the over-optimization of the parameters used. I did a small test and had two of your parameters (Std and Average) optimized.
See the 3D charts with profit, number of trades and percentages winning respectively.
The number of trades and the percentage of winning trades is a nice flat curve, the curve of the profit, on the other hand, is much rockier which means that the profit is strongly dependent on your settings.
” … on the other hand, is much rockier which means that the profit is strongly dependent on your settings. …”
@JS That is interesting.
I didn’t know that, I would have thought that the Market had simply become much more volatile since corona.
What values did you use to optimize (Sandart dev., Average)?
Here it the code with MM. The Code Without MM is the same but just with “buy 1 Contract at Market”.
// Festlegen der Code-Parameter
DEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert
// Verhindert das Trading an bestimmten Wochentagen
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten Uhrzeit
noEntryBeforeTime = 090000
timeEnterBefore = time >= noEntryBeforeTime
// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten Uhrzeit
noEntryAfterTime = 220000
timeEnterAfter = time < noEntryAfterTime
// Bedingungen zum Einstieg in Long-Positionen
c1 = (open < close)
indicator4 = Average[217](close) //200
c4 = close > indicator4
IF c1 AND c4 AND (abs(close-open[5]) > 55*pointsize) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
BUY PositionSize CONTRACT AT MARKET
ENDIF
// Bedingungen zum Ausstieg von Long-Positionen
indicator1 = Stochastic[9,4](close)
indicator2 = Average[7](Stochastic[9,4](high))
c2 = (indicator1 > indicator2)
indicator3 = STD[45](close)
c3 = (indicator3 < indicator3[1]) //3
IF c2 AND c3 THEN
SELL AT MARKET
ENDIF
// Stops und Targets
SET STOP pLOSS StopLoss //106
SET TARGET pPROFIT 319
REM Money Management
Capital = 10000
Risk = 0.01
StopLoss = 102
REM Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
JSParticipant
Senior
Hi
@imokdesign
First, thank you for sharing your system.
Above, I just took two parameters to vary.
Everyone is looking for a robust system, a system that can withstand changes in the market. When there are many parameters in your system, the chance of a robust system becomes smaller and smaller, and the system will only work in a market that is equal to the market in which the parameters are optimized…
I have tried some other time frames, but it remains difficult with so many parameters.
Maybe there are other ideas?