Universal MA Cross EA - page 16

 
iscuba11:
Thanks! If we can get this ConfirmOnEntry [false] resolved, the ea will be a powerful ea. I can see how this may complicate the logic sequence, but without it being set to false, the program triggers too late on a major breakout (1 bar later). It can cause an entry to be at the top of a rise, and if the currency retraces before advancing again, you can get stopped out, even with a 50 pip stop loss (Happened to me). But if we got in earlier on the intial rise, we would not of been stopped out.
Do your best Dave!

Dave

<

Hi Dave, I've uploaded the fixed version, please try it and let me know your comment. Thank you in advance

 
rarango:
hi,

I tried to optimize some settings in the backtester and there the ea seems to be working fine. But when I run in demo account it does not place any orders after a cross.

Every thing seems to be O.K: smiling face si on chart and allow live trading is checked.

My settings are:

Expert_Name=---------- Universal MA Cross EA v7.1

MagicNumber=1234

StopLoss=180.00000000

TakeProfit=26.00000000

TrailingStop_Setting=---------- Trailing Stop Setting

TrailingStopType=2

TrailingStop=1

Indicator_Setting=---------- Indicator Setting

FastMAPeriod=10

FastMAType=1

FastMAPrice=0

SlowMAPeriod=80

SlowMAType=1

SlowMAPrice=0

CossDistance_Setting=---------- Min Cross Distance Setting

MinCrossDistance=1

MaxLookUp=1

Exit_Setting=---------- Exit Setting

StopAndReverse=0

PureSAR=0

ThirdEMA_Setting=---------- Third MA Setting

UseThirdMA=0

UseCounterTrend=0

OnlyCounterTrend=0

ThirdMAPeriod=100

ThirdMAType=1

ThirdMAPrice=0

CTStopLoss=0

CTTakeProfit=0

Order_Setting=---------- Order Setting

ReverseCondition=0

ConfirmedOnEntry=1

OneEntryPerBar=1

NumberOfTries=5

Slippage=5

OpenOrder_Setting=---------- Multiple Open Trade Setting

MaxOpenTrade=2

MinPriceDistance=5

Time_Parameters=---------- EA Active Time

UseHourTrade=0

StartHour=10

EndHour=11

MM_Parameters=---------- Money Management

Lots=1.00000000

MM=0

AccountIsMicro=0

Risk=10

Alert_Setting=---------- Alert Setting

EnableAlert=1

SoundFilename=alert.wav

Testing_Parameters=---------- Back Test Parameter

PrintControl=1

Show_Settings=1

Thanks a lot for help

Hi rarango, please download the updated version on post #1 and try it. Let me know if the problem still there. Hope this help

 
juanchoc:
Hi!

Nice ea!

Can you add a shift property to the moving averages?

JCC

Hi, added to the EA, check post #1. Hope this help

 

Thank you

Firedave,

Thank you, and congratulations for your work. I am new to forex and your ea has helped me a lot to understand the use of Moving averages for trading.

its flexibility is great!

 
firedave:
Hi Dave, I've uploaded the fixed version, please try it and let me know your comment. Thank you in advance

You have made my day & week FireDave! I pray it works. Yes this is going to be a powerful EA. Your skills are greatly appreciated. We are very close.

Next week may tell the story. Thanks my friend, and have a 'Great Weekend!'. Stay away from earthquakes, tidal waves and volcano eruptions!

Dave

<<

 

FireDave, evidently you omitted the MinCrossDistance and MaxLookUp when you fixed the ConfirmedOnEntry to false. This is not working good, because the cross is not validated by the gap. Consequently, some crossovers are not good crossovers and a loss is sustained. Can you not have it that the same procedure for checking on the ConfirmedOnEntry (next bar) start on the current bar if you select ' false ?' This way it would work properly on the current bar and the gap on the cross will be validated on the current bar or a few bars later using the MinCrossDistance and MaxLookUp feature. This would really help eliminate false crossovers on the current bar. Your expertise is appreciated!

Dave <
 

Simple SAR MA Cross needed

Hi,

Im looking for a SIMPLE stop and reverse (Always in the market) EA bot.

The ones in this thread are too complicated it seems. I tried pure SAR mode

with the Universal EA but it didnt seem to work. It closed with a huge loss, which as u can see from this gif file is virtually impossible with my settings.

Id also like MM included (10% trade always).

Perhaps someone knows how to simply modify existing EAs to accomplish

the above objective.

As far as I can see (please correct me if Im wrong), there is virtually no way to signifigantly lose much money with a 14/196 cross set-up. Because: Whenever the crosses are fast...just in and out, it seems to be about break even. The longer the cross stays in play..the more profit builds up.

Id like to use a very basic MA cross EA for Position Trading. Please take a look at the attached GIF file. Here you can see 14/196 MA crosses.

I count 8 finished (open and closed) crosses. None for any signifigant loss. The smaller ones ended up in either at near break even or for a minor profit.

The largest cross was for 1973pips over 1Yr4months. Thats LONG term trading, but it suits me, for its very very safe. In my case, Id have opened that for 5L, and that turns out to be $90,865 for that period of time. Thats a good return on investment in my books for a very safe approach.

The above was for Euro/USD if you are interested to know. There are many other currency pairs that such a system works well on, so its important the EA will be able to be used on multiple pairs simultaenously.

Files:
 

Hi Dave,

You have done an excellent job of coding this system, I have been using it a few days trying to get the parameters I need, it will probaly do it, I just have not figured it out yet. I know your time is valuable, so many questions so little time.

Perhaps you or someone else could answer this.

I'm using a 4hr TF on the cross I want to stay in trade if the cross is still true at the close of bar, if not exit. Than on any future bars exit as soon as there is a cross and not wait for the close of bar, as on 4hr price can really get away from you. A profit could turn into a loss.

I'm using 8 EMA of open & 5 EMA of close.

Thanks for your help,

Al

 

Start and Stop Hour

If the EA is supposed to be automatic, why does the start and stop function in the UNI MA only create a comment?? Why is it not starting and stopping the program trading??

Dave <<
 

Firedave, include this coding to fix the alert function so it displays which currency is crossing up or down. Code is located at the bottom of your coding. My thanks to LowPhat, who helped to resolve this one issue.

//----------------------- ALERT ON MA CROSS

//----------------------- SOURCE : FIREDAVE

void subCrossAlert(string type)

{

string AlertComment;

if(type=="UP")Alert (Symbol()," - ", "Moving Average Cross UP !");

if(type=="DOWN") Alert (Symbol()," - ", "Moving Average Cross DOWN !");

Alert(AlertComment);

PlaySound(SoundFilename);

}

//----------------------- END FUNCTION

Dave <<
Reason: