Raw Ideas - page 105

 

Backtest

FloFri:

I will download MT4 platform later for FXDD and test it.

In the meantime, have you run a longer backtest over several years?

 

Ea

F1trader

With all credit to your trading system, here's a first version of the EA.

It is a 0.9 version. It may take a few days more to get it right, but the start is here.

This version doesn't place stops, it just trades the levels. It's doings can be read in a logfile that starts with "pptr1".

Parameters are pretty self-explanatory. The same "Slippage" is used for all trades.

Risk appetite can be tuned with RiskPercent, which means it takes this value * AccountBalance (i.e. 30 means 3 lots with 10.000, etc.), or just enter a fixed number of lots.

It uses the OrderReliable.mqh include for better control over the orders.

Please let me know what happens.

Files:
pptr1.mq4  6 kb
 

5 Digits (choosable) version uploaded in previous post. Briefly tested, orders are ok now.

As for backtesting over a longer period, I would like to have confirmed that the EA works exactly as required, before that. I have done backtesting over 4 months with some consolidating MM, and with some risk, the return %'s going into several 100's. BUT: we've so many examples of cases where this is still not valid in real time.

As for placing orders without SL and TP, in an ECN like execution: good practice. I will change this. Required only in platforms that dictate this (that don't have the option to place SL and TP manually as well in the order-entry).

Finally, the system as offered by F1trader seems to work quite well. Now we can change parameters in backtest (e.g. my results show that a different time to estabish the Pivot indeed can have a positive effect on the return).

Since this is not my system, I will leave it to F1trader what to do with the EA. For the moment the latest version is updated in post 1039.

 

Excellent Work

FloFri:

Excellent work. If the EA works exactly how I describe. The next stage of the testing process, is to see which currency works best with the EA.

Testing over a long period, I will backtest numerous pairs.

Once I can find a pair that reacts well to the EA. I will analyse to see if we can use martingale safely and profitably.

We are looking for a pair, with NO, or the LEAST losing days.

That way, martingale will work wonders. If there are many losing days on a pair, then martingale is absolutely no good for the system. As 8 losses in a row, using martingale after every 15 pips, will end being a big loss at the end of the day and it will take a while to recover such loss.

Basically, we are looking for a pair; if triggered, will meet target within a maximum of 8 losses. If a pair, has losing days here and there (does not meet target after trade is triggered), then the EA/MARTINGALE strategy is no good for that pair.

For such pair, we just use the simple EA, with MM and no Martingale.

Martingale will ensure, that every trade/day is a winning, even if there a more losing pips than winning ones in a day.

Without martingale, we will be wanting more winning pips than losing ones.

Which so far, this EA has seem to have proved to be succesful at on EURUSD 4 months backtesting.

 

Current EA trade is 124 pips profit

Martingale can be a good thing, but with 8 shots it goes like:

0.05 0.1 0.2 0.4 0.8 1.6 3.2 6.4

Or...?

Simple compounding is a nice one: with starting leverage of 25 (i know this is considered by most as way too much), might have given the attached graph. 84 trades in 4 months.

Files:
graph.jpg  47 kb
 

Martingale/Money Management

Flo Fri:

The backtesting results look great.

I do not know what you mean by 25 leverage and simple compounding, could you explain more.

In regards to your martingale explanation.

Please look at my following post on how I would calculate martinagale, we are not doubling everytime:

https://www.mql5.com/en/forum/180164

The EA needs to work out the risk/reward ratio.

The problem we have here, is the TP level for target S1 and R1 will be different. So if we go long, the risk/reward ratio will be different, and if we go short, the risk/reward ratio will be different.

Solution: The EA can work out the average risk to reward ratio.

So If:

TP for buy order is 50 pips, and SL is 15 pips. R/R ratio: 1/3.33

TP for sell order is 25 pips, and SL is 15 pips. R/R ratio: 1/1.66

The average Risk/Reward ratio here is 1/2.5

So we increase the position size by 50% each time (not double).

So: 0.1, 0.15, 0.22, 0.33, 0.49, 0.73, 1.09, 1.63

 

love this raw ideas thread - awesome info!

 

f1trader,

martingale with 1.5 sounds good.

The compounding I meant is the most straightforward I can think of, and is applied to the trades in the graph: always take a fixed portion of your account as a lot size factor. So, when RiskPercent = 30, and your account balance = 1000, the EA trades 30*1000 = 30000 = 0.3 lots.

If this trade is profitable, e.g. we make 50 pips, then the account is 1150. The next trade will be 30* 1150 = 34500 = 0.35 lots, and so on.

 

Need help with simple EA

I have an EA and I want to add one more criterion to it. I don't want to take any trades long if price is below parabolic SAR and I don't want to take and short trades if price is above parabolic SAR. Could anyone help me with this code and where I would potentially put it? Newbie to programming, would appreciate any help a ton.

 

Give this a look

This system works good on a four hour chart. It can work on low times but I use the one hour and four hour charts. The buy signal is when the RSI is on the 4.7 line the sell signal is when the RSI is on the 95 line. And take the chart shift off. For some reason the RSI moves. You can see it in the example.

the RSI is above the 95 line. and zoom out a little. If you are zoom in too much it can make it move too.

Here is the example.

P.S put the RSI on 2000 period it works better.

Files:
the_one.tpl  2 kb
ex.bmp  1407 kb
Reason: