Each IND. in EA works fine. How's best to COMBINE IND's in singal EA?

 

I have an EA with one IND, and another EA with another IND.

I wish to combine the Two IND's into a single EA.

NOT - *how* to combine the two into one- That part of the coding is done and it works fine.

But Rather, HOW to optimise !


For example, a STOCH, and a MACD ( who cares if these are the exact same two, but it'll work as an example.

The problem: They don't "Sync-Up" at the same time.

They are both great IND's and both create signals ( by themselves),

but I don't understand how to raise a signal in - say- MACD and leave it Raised until -say- Stoch becomes "Ready"

Actually, I know how to code this too, but I don't know if that is the "BEST" way to accomplish this task.


My question then becomes, - What is the BEST method to sync multiple IND's in an EA ?


Please Advise,

 
dt   var1 = iMacd(...)
dt   var2 = iStoch(...)
bool macdBuy  = var1 > x;
bool stochBuy = var2 > y;
if (macdBuy && stochBuy) OrderSend(OP_BUY...)
 
WHRoeder:


WHRoeder,


TNX for the quik response.


myMACDOrderType=MACD();
myRSIOrderType=RSI();
myStochOrderType=Stoch();
myGenKovOrderType=GenKovs();
PrintMe();

. . .

if ( myRSIOrderType == OP_BUY || (myStochOrderType == OP_BUY ) )
{
myOrderType = OP_BUY;
}



Yea, I have the coding figured out; (mostly). - Well, everything is "Running" and bringing in $$$ so far.

The part i don't know is how to synchronise (sp) the two.

OR'ing them simply gives me MORE trades per hour, and AND'ing them simply gives me (a lot) fewer trades.


Both of these methods return good results.

However, I'm seeking a way to "TWEEK" the results for maximum results.

Meaning, Should I ...

(A) simply add both IND's and continue to tweek the variables until things begin to work (better) - May take a lot of tweeking!

(B) Fine-Tune each IND seperatly and "Assume" that they'll play well together (which is what we've both written here)

(C) - and this is what I'm looking for... Is there some way to ....

Well, what I can do is to LOWER the threshold on both IND's so that they -more often- become synch'ed

(and therefore produce a "fair" number of trades per hour.


Well, let me know if you think of any (additional) suggestions.

TNX


// FYI,

// Later, IN THE CODE I " Go-Sub " with an OPEN-a-trade(mytype) fnc

// and check the value of myordertype...

if (myOrderType==OP_SELL && ContinueOpening)


// and then OrderSend depending on it's value ...

{

OrderSend(Symbol(),OP_SELL,Lots,SellPrice,slippage,0 ... ;

}

//

 
Are those results working on forward test or back-test. If forward tests, are they working on real markets and for how long have you been testing?
 
ubzen:
Are those results working on forward test or back-test. If forward tests, are they working on real markets and for how long have you been testing?

My back tests are :

2-3 days,

1 month

6 month

and from 1st of year

+++

Forward Testng - about 8-10 days ( on EurJpy until FM of J stepped in - now testing on AusCad 2 days

+++

on Lots = 0.01 I get about $200 / week

However I strongly believe that this app has GREAT potential.

Reason: