Hi MT,
I was looking through your code, and it's relatively easy to read (especially considering this is my 1st crack at dealing with this platform), so you definitely get points for that...
That said though, I think you may have misinterpreted the OP's system a bit, as I believe that his entry rules, divided into "1" and "2" for both long and short, are 2 separate sets of entry rules.
In other words:
Quote:
|
Originally Posted by PolishPip
Long:
1. MACD Crosses negative to positive, RSI above 50
2. MACD is positive, 5 EMA re-crosses 10 EMA in positive direction
|
I believe this means that you enter either if MACD crosses negative to positive with RSI>50...
Or if MACD is positive, and your EMA cross each other upwards.
Assuming I interpreted the OP correctly, I'm thinking your entry conditions should look something like:
Code:
if((MacdPrevious<0 && MacdCurrent>0 && Rsi>50) OR (ShortEma>LongEma))
// or split it up into 2 separate if statements, which I think would be preferable...
(I'd also question the 'ShortEma>LongEma', since that doesn't seem to indicate a cross, just the short being over the long)
Edit: I'm trying to get a grasp on the platform as we speak, so I'll try to see what I can do with it when I do... Hope you don't mind me working off of yours? ^_^