Chimera - Trending EA - based on Phoenix.

 

This Thread is to host the trending version of Phoenix. Phoenix is a counter trending EA.

autumnleaves:
I agree with Bert, the whole thing is becoming very confusing, and I am partly to blame. I suggest that the trending version of Phoenix be given a new name. In keeping with the mythological reference, why not call it Chimera? If you have a better name, please step forward.

There has been so much new information since yesterday that I hardly know where to start. In order to keep focussed, I'm going to concentrate on individual signals today in the trending version (or Chimera) based on 5.7.2W. I owe PContour a great debt of thanks for checking out the EASY signals and putting my mind at ease. I am convinced that TS does not work when signals are set to trend, however, so I am not using it now. Daraknor is determined to incorporate all of the EASY signals in the next release of Phoenix 6. At that time I will switch testing to Phoenix 6/Chimera. Then I think we must not release any new versions until we have consensus on the need for it.

I am filled with optimism and thank everyone (Bert, Azbo, Darak, PC, Mario, m6, etc.) for their great input.

This EA is in the development stages. -------------

Phoenix signal two and three have been reversed to make this a trending rather than a counter trending EA. Autumn leaves has contributed two additional signals to the code.

The trailing stop of mode1 works. I didn't have success with Signal six and turned it to false.

 

Chimera defined

A great idea by PContour to start a new thread for Chimera. It was probably not prudent to mix reports/code/comments on the two systems in the same threads, which would only further add to the confusion.

I am not sure which definition from the dictionary entry below best fits the EA Chimera. All of them may be apt to one degree or another. Comments on and improvements to the code are welcome.

Note: in PContour's version of Chimera, signal 1 is left countertrending. I prefer to switch all 4 Phoenix entry signals to trending signals in my version.

1 a) capitalized : a fire-breathing she-monster in Greek mythology having a lion's head, a goat's body, and a serpent's tail b) : an imaginary monster compounded of incongruous parts

2 : an illusion or fabrication of the mind; especially : an unrealizable dream

3 : an individual, organ, or part consisting of tissues of diverse genetic constitution.

 

I'm working on implementing the SIgnals in Phoenix 6. I converted the ones already in P.EASY quickly enough, but I've been reading through their descriptions to find out what the system looks like. It appears EASY is the combination of 10 moving averages.

Traders Dynamic Index =

1&2 RSI = 13 period, Close (Segregated MA)

3&4 Volatility Band =34 period, Close (MA based)

5 RSI Price Line = 2 period, Close, SMA

6 Trade Signal Line = 7 period, Close, SMA

price action channel = 2 Smooth MA:

7 5 period, High

8 5 period, Low

9 Market Base Line = (unstated MA)

10 Heiken Ashi = weighted average of bar

I was thinking of adding candlestick patterns or HeikenAshi (weighted, adjusted candlesticks) into Phoenix but I'm thinking that the two systems probably won't line up very often.

I added S&R lines, and a Trend check (historical only) to P6 Beta.

If you want to continue implementing EASY into Phoenix as Chimera, can you explain exactly how to calculate "Market Base Line"? I'm pretty sure RSI Price Line (the main indicator) is a moving average over RSI, but I'm still researching this.

 

I'll set up an account (yet again lol) for Chimera. Where do you guys want the test results? Here in this thread, the Phoenix test result thread, or are you opening a new thread just for Chimera's test results?

Geeez, I hope my laptop doesn't burn up running all these EAs lol

Edit: ehhh..... where does the ini go?

Edit2: ok, I found the "config" directory with a bunch of ini files in it, is that where it goes?

 
daraknor:

Traders Dynamic Index =

1&2 RSI = 13 period, Close (Segregated MA)

3&4 Volatility Band =34 period, Close (MA based)

5 RSI Price Line = 2 period, Close, SMA

6 Trade Signal Line = 7 period, Close, SMA

price action channel = 2 Smooth MA:

7 5 period, High

8 5 period, Low

9 Market Base Line = (unstated MA)

10 Heiken Ashi = weighted average of bar

Daraknor, I think you've got it all right. I attach some notes I made on the EASY signals which might clarify a few points. In summary, the situation is as follows:

Heiken Ashi: (see the attached mq4 for the indicator)

Price Action Channel (PAC) upper and lower: already done in the Chimera code

double HighPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_HIGH,0);

double LowPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_LOW ,0);

double haClose1 = (Open[0] + High[0] + Low[0] + Close[0])*(0.25);

(the latter is the Heiken Ashi price used for the signal)

Relative Strength Index (RSI): also already in Chimera code

double RSILine = iRSI(NULL,0,P_RSIArrPer,PRICE_CLOSE,0); //Period=13 Price=0

Trade Signal Line (TSL): Requires a simple MA on an RSI array, 7 period. close price. I have tried to implement it as follows (based on the Traders Dynamic Index Indicator attached)

double TradeSignalLine = (iMAOnArray(RSIBuf,0,P_TSLPeriod1,0,P_TSLMode1,0));

The array appears to be defined as follows:

RSIBuf = (iRSI(NULL,0,RSI_Period,RSI_Price,i))

RSI Price Line (RSI): appears to be a 2 period simple MA on the RSI array. Something like this:

double RSIPriceLine1 = (iMAOnArray(RSIBuf,0,P_RSIPeriod1,0,P_RSIMode1,0));

Market Base Line (MBL): the sum of the high and low limits of the volatility band (VB) (a 34 period MA on the array, I think), divided by two:

UpZone = (MA + (1.6185 * StDev(RSI,34)));

DnZone = (MA - (1.6185 * StDev(RSI,34)));

MdZone = ((UpZone + DnZone)/2);

You will have to look at the Traders Dynamic Index indicator to see how the StDev function, MA, and RSI are set up. It's all way beyond me.

The trade triggers are as follows (in a nutshell)

haClose > PAC High = Buy

haClose < PAC Low = Sell

RSI > TSL means Buy

RSI < TSL means Sell

RSI and TSL crossing means Exit

RSI > MBL means Buy

RSI < MBL means Sell

Market reversals when MBL hits 32 or 68

RSI > VB means add a second Buy

RSI < VB means add a second Sell

RSI crosses inside VB means probable Exit

It's all based on whether haClose is outside the PAC and the RSI crosses TSL, MBL, VB.

Remember that this is all trending. No counter trend here.

I hope this helps. Let me know if I can provide anything else for you. Your dedication and efforts are greatly appreciated. I don't know how you manage all this!

Files:
 

Testing

I would suggest that we hold off on testing until we have a full stable Chimera version within the Phoenix 6 matrix. Then some brave soul can set up a thread for the test results.

 

Ok autum, I'll hold off on the testing. I've just set up the account, so I'm ready to go whenever the EA is ready.

 

It looks like you have 2 indicators in. I managed to simply paste in the code from TDI and it compiles now. Now I'm going to read the arrays for values and test them all. It will be a mess at first because it is only going to be 3 or 4 indicators for 10 MA.

 

EASY signals

That's right, the PAC and RSI relative to 50 signals are approved and certified, thanks to PContour:

//=====================SIGNAL6========================

bool BuySignal6=false, SellSignal6=false;

double HighPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_HIGH,0);

double LowPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_LOW,0);

double haClose1 = (Open[0]+High[0]+Low[0]+Close[0])*(0.25);

// Print("HighPAC1: ", HighPAC1, "LowPAC1: ", LowPAC1, "haClose1: ", haClose1);

if(U_UseSig6)

{

if(haClose1 > HighPAC1) {BuySignal6 = true;}

if(haClose1 < LowPAC1) {SellSignal6 = true;}

}

else

{

SellSignal6=true;

BuySignal6 =true;

}

//=====================SIGNAL7=======================

bool BuySignal7=false, SellSignal7=false;

double RSILine = iRSI(NULL,0,P_RSIArrPer,PRICE_CLOSE,0); //Period=13 Price=Close

if(U_UseSig5)

{

if(RSILine > P_RSI_High) {BuySignal7 = true;} //High and Low are 50 by default

if(RSILine < P_RSI_Low) {SellSignal7 = true;}

}

else

{

SellSignal7=true;

BuySignal7 =true;

}

 

This is kind of messy still and not ideal, but it only recalculates the arrays when the bar increments. That is both for performance, and for the fact that the signals change a hundred times while the bar is being drawn.

EntrySignal1 =RSI and TSL crossing means Exit is not used, but declared.

The only time to fire off a second trade is while you are entering the first one. THat can be changed, but I would need to know when else I should allow firing a second trade. It can also be pasted anywhere, but it should probably only be checked once per bar. Maybe inside the EntrySetup() when a new bar is discovered?

I am not handling "probable" exit points at all.

It is kind of quick and dirty, I didn't get the changes made by PContour yet. A lot of junk can be removed safely, I emptied most of the unnecessary bits but a lot of stuff is floating around still. I need to go, my gf is annoyed I've been here all day writing code...

double RSIBuf[],UpZone[],MdZone[],DnZone[],MaBuf[],MbBuf[];

I'm assuming RSIBuf=RSI Line

UpZone= Volatility Band Top

DnZone = Volatility Band Bottom

MdZone= MBL

MaBuf= unused, possibly RSI Price Line. Since you said RSI, I didn't use this value. Please Note Signal 5 might be A) inaccurate or B) duplicate.

MbBuf = TSL

bool ExitSignal1()

{ //RSI and TSL crossing means Exit

bool SellNow;

if( (RSIBuf[1]MbBuf[0]) )SellNow=true;

if( (RSIBuf[1]>MbBuf[1]) && (RSIBuf[0]<MbBuf[0]) )SellNow=true;

}

int EntrySignal1()

{ //RSI > TSL means Buy RSI < TSL means Sell

int value=0;

if(RSIBuf[0]>MbBuf[0]) value=Buy;

if(RSIBuf[0]<MbBuf[0]) value=Sell;

return (value);

}

int EntrySignal2()

{//RSI > MBL means Buy RSI < MBL means Sell

//TODO Market reversals when MBL hits 32 or 68 = entry signal? reversal for Phoenix?

int value=0;

if(RSIBuf[0]>MdZone[0]) value=Buy;

if(RSIBuf[0]<MdZone[0]) value=Sell;

return (value);

}

int EntrySignal3()

{ //RSI > VB means add a second Buy RSI < VB means add a second Sell

int value=0;

if(RSIBuf[0]>UpZone[0]) value=Buy;

if(RSIBuf[0]<DnZone[0]) value=Sell;

return (value);

}

int EntrySignal4()

{ //part of EASY

int value=0;

double HighPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_HIGH,0);

double LowPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_LOW,0);

double haClose1 = (Open[0] + High[0] + Low[0] + Close[0])*(0.25);

if(haClose1 > HighPAC1) value=Buy;

if(haClose1 < LowPAC1) value=Sell;

Debug("Signal4 PAC High:"+HighPAC1+" LowPAC1:"+LowPAC1+" haClose1:"+haClose1);

return(value);

}

int EntrySignal5()

{ //part of EASY

int value=0;

double RSILine = iRSI(NULL,0,P_RSIArrPer,PRICE_CLOSE,0); //Period=13 Price=0

if(RSILine > P_RSI_High) value=Buy;

if(RSILine < P_RSI_Low ) value=Sell;

}
Files:
p6_chimera.mq4  29 kb
 
hhsmoney:
I'll set up an account (yet again lol) for Chimera. Where do you guys want the test results? Here in this thread, the Phoenix test result thread, or are you opening a new thread just for Chimera's test results?

So no-one is going to start post results yet. One way this can be done later is to, setup your post and then, just update it once a week. You can zip up your results and keep a whole history in one zip file.

I am going to bed the trailing stop fix will need to wait a few days.

Autumnleaves,

Are you going with the P6 Chimera. Do you want to forget about Chimera 5.7.2.