SDS - Simple Daily System EA - page 3

 
lcfxtrader:
Omelette,

I do not understand what you mean by "OrdersHistoryTotal() problem as described above". The problem I have experienced is that the EA would open the wrong position size after a loss.

EX:

1st trade = .1 lot resulting in a loss

then it would open

2nd trade = .3 lots

It should have been .2 lots

OrdersHistoryTotal() is buggy, meaning it will not work properly when backtesting. Also, when it is used in an EA that is being forward-tested, (such as this one) if there is no closed orders visible in the 'Accounts History' tab, the 'LotSizeFactor' variable (which is causing the problem) will not be set correctly...

That said, I have had a proper look at the code and the problem seems to be a 'recovery' issue, and not the code per-se - so I have restored the original code and added some 'recovery' code! (original post) Making an EA 'robust' to account for 'recovery' problems can be more difficult then writing the EA itself! And there is no guarantee with what I've done here - so let me know how it goes!

 

Omelette,

All the trades opened per the rules except EUR/CHF. It meet the 3 requirements on the candle close (< SMA, < PSAR, 10 day ADR @ 51). The red arrow you see in the pic was a few days ago on the original EA. Any idea why it would not open according to the code? Thanks again for all your help. Would you like to test along with us?

Lcfx

Files:
eurchf.gif  67 kb
 

I've just realised I do not even know what the strategy is - could you outline exactly what is involved, as it's easier to know what the EA should be doing, rather than trying to work it out from the code - entry conditions I understand, but are you scaling into a position, semi-martingale-style, and waiting until a certain dollar value is achieved, or are losers closed out???

Also, is the EURCHF problem in addition to the lot-sizing bug?

 

Does the EA work on IBFX mini account as well as standard? Just wondering if m at the end of pairs will cause it to not work.

Regards. Luk.

 
zomg:
Does the EA work on IBFX mini account as well as standard? Just wondering if m at the end of pairs will cause it to not work. Regards. Luk.

Luk,

I don't know. I am using a standard IBFX account for testing. Give it a try and report your findings.

Lcfx

 
Also, is the EURCHF problem in addition to the lot-sizing bug?

I don't think so because I deactivated the old EA and loaded your version along with opening a new demo account. It meet the criteria for a short on the last daily candle. I will watch it again tonight and see what happens.

Here's an update on the EA performance.

Files:
sds_08.13.jpg  168 kb
 

Thanks, that explain things nicely (and also what SDS stood for )

The EURCHF order you mentioned not opening - is this an additional bug?

Edit: Aha, I see you have just answered!

 
omelette:
Thanks, that explain things nicely (and also what SDS stood for )

The EURCHF order you mentioned not opening - is this an additional bug?

Edit: Aha, I see you have just answered!

I don't know. The criteria was there to open a short. I doubled checked the open and closed orders and didn't see it. I will watch for the short tonight (0:00 GMT).

 
lcfxtrader:
I don't know. The criteria was there to open a short. I doubled checked the open and closed orders and didn't see it. I will watch for the short tonight (0:00 GMT).

As I said, already, I think that original code should work ok, but you seem to suggest that what I initially changed (then changed back!) produced different results - is this correct?

 
omelette:
As I said, already, I think that original code should work ok, but you seem to suggest that what I initially changed (then changed back!) produced different results - is this correct?

No, not at all. I just don't know why it didn't open a short. Perhaps there is a bug in the code. It is just odd that all the other trades opened.

I appreciate all your help Omelette.

Reason: