Universal MA Cross EA - page 53

 

I've already try UniversalMAcrossEA[5-Dig]-v.4...

the result is there is a bug on "expert" journal when opening position as explained in above post.

I also found out that the trailing stop feature is not working smoothly.

this is the condition :

OP Buy Gbp/Usd (TF 1H) at 1.5274 with TP at 1.5174 (100pips) and SL at 1.5324 (50 pips).

I set the trailing stop at 20 pips.

Gbp/Usd move up to 1.5304, but my trailing stop only move to 1.5279 (it should be at 1.5284)....

Gbp/Usd price move down a bit to 1.5290...

then move back up to 1.5318 and I found out that my trailing stop is still at 1.5279.....

why is this happening ? ....please kindly help fix this....thanks

 

Trailing Stop Works Fine

4x tr4d3r:
I've already try UniversalMAcrossEA[5-Dig]-v.4...

the result is there is a bug on "expert" journal when opening position as explained in above post.

I also found out that the trailing stop feature is not working smoothly.

this is the condition :

OP Buy Gbp/Usd (TF 1H) at 1.5274 with TP at 1.5174 (100pips) and SL at 1.5324 (50 pips).

I set the trailing stop at 20 pips.

Gbp/Usd move up to 1.5304, but my trailing stop only move to 1.5279 (it should be at 1.5284)....

Gbp/Usd price move down a bit to 1.5290...

then move back up to 1.5318 and I found out that my trailing stop is still at 1.5279.....

why is this happening ? ....please kindly help fix this....thanks

Hi 4x,

The Trailing Stop is a triggered trailing function...not a set level. It is triggered when your TS is hit above (Buy) or below (Sell) your order price...and then it follows the price minus the TS. The TS holds it's position when price reverses...until the TS is hit or price continues to TP.

Best way to watch and understand this is to run Strategy Tester.

Set Dates and Check Visual Mode

Run a quick 1 month test to see some Buy/Sell trades.

Find the best trade day with longest bars. Set your dates to that one day to speed up testing.

Set SL=100 and TP=50

Set Trailing Stop Type=1

1=TS triggered after TS pips reached

2=TS triggered immediately (try this after you understand TSType=1)

Set TS = 10 (keep TS small so you can see it work immediately). Then set TS at 5 and 20 to see the difference.

Set a TS line on chart for visual reference

Run the tester in slow motion and watch the TS get triggered and follow the price. It works fine.

See attached screen view. Top Blue line is TS=20. You can see where the bar went above TS=20 and triggered the TS to follow the price up (the dotted red line above the Buy line).

Hope this helps.

Robert

 

Hi all-

Can someone please post the version of this ea that actually works-that opens and closes trades and doesn't keep throwing up constant errors in failing to open trades.

Is anyone actually trading this ea on a day to day basis without problems?

kind regards

rickyc

 

universal ma cross

you see this setting for eur/usd 15mm:

-stop loss: 250

-take profit: 30

-trailing type: 1

-trailing stop: 5

-fastmaperiod: 7

-fastmatype: 1

-fastprice: 0

-fastshift: 0

-slowmaperiod: 50

-slowmatype:1

-slowmaprice:0

-slowshift:10

-mincrossdistance: 40

-maxlookup: 11

-stopandreverse: false

-pursar: false

-exitoncross: false

-usethirdma: false

-usecountertrend: true

-onlycountertrend: true

-usepivotfilter: false

-reverscondition:false

-confirmedonentry:true

-oneentryperbar: true

-numberoftries: 10

-slippage: 5

-maxopentrade: 2

-minpricedistance: 10

-usehourtrade: false

-lots: 0.04

-mm: true

-accountismicro: true

-risk: 12

-enable alert: true

-printcontrol: true

-show-setting: true

only 500$ account, testing in forex.com o fastbrokers from 01/01/2009 to 31/12/2009

 

I was hoping to use this to trade 3 MA's with a fast crossing the High/Low of the the other two MA's, however unless I'm miss reading the instructions it doesn't look like that can be done.

The idea is to take a Long when the Fast crossess the High of the Slow, and a Short when the Fast crossess the Low of the Slow. If anyone can explain how to accomplish this with this EA it would be appreciated. Or, if perhaps you could point me in the direction of an EA that does do this while at the same time has auto-lot sizing based on user definable risk %.

 

trade dispatcher (trade context is busy)

I also try this with several currency using same setting.

problem that i found today is that when there are signal produced from 2 different currency ( in this case - buy Eur/Usd & sell Usd/Chf) which both triggered OP at the same time (new 4H bar)..., only one executed into OP (sell Usd/Chf)...the other (buy Eur/Usd) failed

in the "experts" journal....buy Eur/Usd failed...trade dispatcher... trade context is busy.... and OP for buy Eur/Usd is not re-executed (although in the setting max try = 10, slippage =5, and the new price for buy Eur/Usd after failed is only 1 pips difference from before)..

I wonder why this is happening....

 

Latest Version In Post#516

rickyc2511:
Hi all-

Can someone please post the version of this ea that actually works-that opens and closes trades and doesn't keep throwing up constant errors in failing to open trades.

Is anyone actually trading this ea on a day to day basis without problems?

kind regards

rickyc

Ricky,

The latest version with the Point fix is found in Serpentsnoir last post #516 - UniversalMACross EA [5 dig]-V4. You can also find it in the Attachments Clip at the bottom right of the page.

This is the latest version I just tested - it still has the "debug" lines in the logs, but I found no 4107 errors and it was trading fine even with just the defaults. My post above shows the results.

In your post #518 and #523 you stated you "downloaded the latest version and would test it this coming week".

In your latest post #526, you state: "Can someone please post the version of this ea that actually works-that opens and closes trades and doesn't keep throwing up constant errors in failing to open trades."

Does this mean you tested the latest version and had some errors? Please attach your logs so we can see the results. As I said above, my tests show no more 4107 errors and it is trading fine.

Hope this helps,

Robert

 

Try Using The 3rd MA

Xionanx:
I was hoping to use this to trade 3 MA's with a fast crossing the High/Low of the the other two MA's, however unless I'm miss reading the instructions it doesn't look like that can be done. The idea is to take a Long when the Fast crossess the High of the Slow, and a Short when the Fast crossess the Low of the Slow. If anyone can explain how to accomplish this with this EA it would be appreciated. Or, if perhaps you could point me in the direction of an EA that does do this while at the same time has auto-lot sizing based on user definable risk %.

Xionanx,

You may be right. The MA settings will allow you to select the PRICE (High, Low, Close, Open, etc.), but it will not let you select BOTH the High and Low for one MA as in your example:

"Fast crosses the High of the Slow, and a Short when the Fast crosses the Low of the Slow."

There is one possibility to try with this EA:

Set your Fast MA period and Price as you like

Set your Slow MA period for Price-High

Use the 3rd MA with the same period as the Slow MA and set it for Price-Low

Try these settings in Strategy Tester. You can do this 2 ways.

1) Run the Strategy Tester. When done, it will print the MA lines for you to review your trades to see if it works.

1) Before you start Strategy Tester - Place MA's on your chart with the same settings as the EA so you can visually see them. Run the Strategy Tester and watch the MA lines cross and trade in real time and decide if it works for you.

I've never done this with this EA, so good luck and let us know what you find out.

Robert

 
{ "results": [ {"date":"1117211156","module":"mql5.com.ru.forum","id":"3_51859","info":{"url":"https://www.mql5.com/ru/forum/51859","author_name":"Forex Trader","author_login":"Forextrader","title":"Проблемы с советником"},"text":"Советник получает глобальные переменные sell, buy и соответственно реагирует на значения этих переменных. Например: sell=0, buy=1 // покупает, если нет открытых позиций. Если есть позиция sell - закрывает ее и открывает buy sell=1, buy=0 //продает, если нет открытых позиций. Если есть позиция buy - закрывает ее и открывает sell Но есть проблема! Он то торгует, а то нет. Может один раз открыть позицию и при изменении переменных не реагирует- не закрывает позицию или закроет и не открывает новую. Вобщем как хочет так и торгует. В чем же дело подскажите?! Код советника. //+------------------------------------------------------------------+ #property copyright Mixasoft #property link //---- input parameters extern double TakeProfit = 0; extern double Lots = 1; extern double TrailingStop = 0; int b, s; double Points; //+------------------------------------------------------------------+ //| expert initialization function | //+-----------------------------..."}, {"date":"1487211787","module":"mql5.com.ru.forum","id":"3_160683_4097700","info":{"url":"https://www.mql5.com/ru/forum/160683/4097700#comment_4097700","author_name":"Voznesen","author_login":"Voznesen","title":"Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам"},"text":"Всем привет, только начал изучать язык, недавно наткнулся на видео урок по созданию сеточного советника, написал, скомпилирывал, 0 ошибок, 0 предупреждений. Но робот не открывает сделок. выкладываю код гляньте кому не лень))) Заранее спасибо! extern double Lots = 0.1; extern double Profit = 50; extern int Step = 30; extern int Magic = 6677; extern int Slippage = 5; extern int maPeriod = 100; extern int maShift = 1; double ma, FindLastBuyPrice, price; //------------------------------------------------------------------ //___ПРОВЕРКА_ЗНАКОВ_ПОСЛЕ_ТОЧКИ___ //------------------------------------------------------------------ int OnInit () { if ( Digits == 3 || Digits == 5 ) { Step *= 10; Slippage *= 10; } return ( INIT_SUCCEEDED ); } //--------------------------------------------- void OnDeinit ( const int reason) { } //------------------------------------------------------------------ // //------------------------------------------------------------------ void OnTick () { ma = iMA (..."}, {"date":"1294056024","module":"mql5.com.ru.forum","id":"3_111497_3077741","info":{"url":"https://www.mql5.com/ru/forum/111497/3077741#comment_3077741","author_name":"Николай","author_login":"auto_free_kolyango","title":"[ВНИМАНИЕ, ТЕМА ЗАКРЫТА!] Любой вопрос новичка, чтоб не захламлять форум. Профи, не проходите мимо. Без вас никуда."},"text":"Подскажите где ошибка? Нужно, чтобы если есть рыночный ордер на продажу по нашему фин. инструменту, то закрыть его и если нет на покупку, то открыть один ордер на покупку. С закрытием то тут всё нормально, а вот открывает он их не один а при каждом тике. //-------------------------------------------------------------------------------------------- extern double LOT = 0.01; //-------------------------------------------------------------------------------------------- int start() { int sells=0; for (int i=0; i OrdersTotal(); i++) { if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true) { if (OrderSymbol() !=Symbol() || OrderType() !=OP_SELL ) continue; OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),3,White); Alert (GetLastError()); // Выводит сообщение об ошибке sells++; } } if (sells==0) { OrderSend(Symbol(),OP_BUY,LOT,Ask,1,Bid-400*Point,Bid+400*Point,0,Green); Alert (GetLastError()); // Выводит сообщение об ошибке return(0); } } //-------------..."} ], "error":"ok" }
 

Trade Dispatcher...Trade Context Is Busy

cosmiclifeform:
Hi 4x,

I've never seen that problem before. That could be a broker problem or an EA problem. I run this EA on Demo's with 2 different brokers with 6+ charts with different pairs. They all trade fine and I have no error messages like that.

There are way too many options and possibilities with this EA to figure out the problem without seeing all your settings and your logs.

* A quick note for others who post "I can't get it to work" - please include all your detail of everything you tried (and didn't try), including posting your settings and logs. Just saying it "don't work" does not give enough information for others to help you.

And what you didn't try...is just as important as what you did try.

Also read the previous posts from the beginning of this thread...they may already have answered your question.

Good luck,

Robert

Hi, Robert

I trade using Alpari russia micro account and also try this on the demo account.

Timeframe is 4H

Currency traded is Eur/Usd, Gbp/Usd, Usd/Jpy, Gbp/Jpy, Usd/Chf & Aud/Usd

Here is the setting :

-stop loss : 500 (50 pips, adding 0 due to 5 digit broker)

-take profit : 500

-trailing type : 1

-trailing stop : 200

-fastmaperiod : 14

-fastmatype : 1

-fastprice : 0

-fastshift : 0

-slowmaperiod : 50

-slowmatype :1

-slowmaprice : 0

-slowshift : 0

-mincrossdistance : 0

-maxlookup : 0

-thirdemasetting : false

-pivotpoint : false

-stopandreverse : true

-puresar : false

-exitoncross : false

-reversecondition : false

-confirmedonentry : true

-oneentryperbar : true

-numberoftries : 5

-slippage : 5

-maxopentrade : 1

-minpricedistance : 5

-usehourtrade : false

-lots : 0.05

-mm : false

-accountismicro : true

-risk : 10

-enable alert : true

-printcontrol : true

-show-setting : true

this EA works fine if signal produced to OP in new 4H bar only came out 1, ex : only Buy Gbp/Usd.

But when there are more than 1 signal produced at the same time, the execution will be only one and the other would failed ( due to trade dispatcher...trade context is busy), ex : there are 2 signal produced....Sell Eur/Usd & Buy Usd/Chf...Usd/Chf is executed while Eur/Usd is failed and no re-OP.

I have read some post in this thread where others also asking about this problem, but they haven't got any replied answer.

Hope this will make the problem more visible.

Reason: