Andre EA v1.0 - page 2

 

Nittany, did you trade with this EA?

 
reysol:
Nittany, did you trade with this EA?

I'm right in the middle of rewriting big chunks of the order entry code blocks.

 
nittany1:
I'm right in the middle of rewriting big chunks of the order entry code blocks.

Sorry, my english is very poor and I didnt understand what you mean

 

Awesome!

How are hard is it to include the stop and reverse feature? i.e if upon order entry price moves against you by x amount of pips, close order and open another order in the reverse direction. If its too much trouble then we can worry about that later once we get the other parts working correctly. I had a couple winning trades today as well as a couple losers.

Thanks again Nittany for helping me out with this.

nittany1:
OK I'll read it again, see what we can do. Maybe I can add ADX in addition to using just the two directional indexes by themselves.
 

I've never written that before but I can give it a try. I actually changed some things around and posted it just now. It now only trades in trending and strong trending price action. It has two separate and distinct rule set for each situation and uses those rules according to how strong the trend is. I think this will make it a better trader, we'll see, right? Heh.

 
nittany1:
I've never written that before but I can give it a try. I actually changed some things around and posted it just now. It now only trades in trending and strong trending price action. It has two separate and distinct rule set for each situation and uses those rules according to how strong the trend is. I think this will make it a better trader, we'll see, right? Heh.

Hi Nittany1,

Thank you for this promising EA.

May I ask you, whether using different conditions for closing buy and sell orders is intentional? (There is || condition for the buy orders and && for the sell orders.)

Regards,

Chrisstoff

//------------------- order management -------------------//

if (ElapsedTimeCheck(WaitMinutes) == true) {

//---------------- check indicators and look for a CLOSE ---//

if (TotalOpenOrders() == OpenOrders)

{

if (adx<ADXStrongTrend) { // if adx is less than strong trend

if (OrderType() == OP_BUY) {

if ((sSignal > sMain)||(longMA > shortMA)){ CloseAll(); }

}

if (OrderType() == OP_SELL) {

if ((sMain > sSignal)&&(shortMA > longMA)){ CloseAll(); }

}

} // end of if adx is less than strong trend

 

That's actually the order close code block. I'm slowly working through trying to make it trade better. I've been forward testing it all day watching its behavior.

chrisstoff:
Hi Nittany1,

Thank you for this promising EA.

May I ask you, whether using different conditions for closing buy and sell orders is intentional? (There is || condition for the buy orders and && for the sell orders.)

Regards,

Chrisstoff

//------------------- order management -------------------//

if (ElapsedTimeCheck(WaitMinutes) == true) {

//---------------- check indicators and look for a CLOSE ---//

if (TotalOpenOrders() == OpenOrders)

{

if (adx<ADXStrongTrend) { // if adx is less than strong trend

if (OrderType() == OP_BUY) {

if ((sSignal > sMain)||(longMA > shortMA)){ CloseAll(); }

}

if (OrderType() == OP_SELL) {

if ((sMain > sSignal)&&(shortMA > longMA)){ CloseAll(); }

}

} // end of if adx is less than strong trend

 

taking wrong trades

I started to test this ea, but it seems to open

the trades to the wrong side. I have different magic numbers on

each chart.

What could be wrong? or its suppose to open trades like this.

Also it closes the trades 2 or 3 minutes after it open.

Attached are some pictures.

 

I'm working on it now, but the chart you attach the expert to is supposed to be blank. I don't know if that matters but I always attach experts to their own blank chart and have a second one open to attach indicators to.

 
nittany1:
I'm working on it now, but the chart you attach the expert to is supposed to be blank. I don't know if that matters but I always attach experts to their own blank chart and have a second one open to attach indicators to.

I can't think of any reason why it would matter. I always attach indicators and the EA to the same chart. That way, I have everything big and beautiful in front of me all at the same time.

Reason: