Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
There's no point in attaching the EA's code (especially in a text file) here.
What version do you use - MT4 or MT5? What settings do you use? Does the smiling face appear in the top-right corner of the chart when you attach it? Are there any errors in the Experts or Journal tabs of your terminal?
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Did you make any other changes to the EA except for changing Multiplier type from int to double?
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
MQL4 Code:
this is my complete EA ... pleas check this |
|
||||
|
Please use attachments to attach long files. If not attachment, then at least use code highlighting.
I've asked what changes have you done to the original EA (that can be found here)? I have no time for searching for your changes myself.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Changes made by me to the original EA are:
1. ATR period has changed from int to double . 2. double SL = Bid - ATR; instead of NormalizeDouble(Bid - ATR, Digits);//in Buy Condition. 3. SL = Ask + ATR; instead of NormalizeDouble(Ask + ATR, Digits);//in sell condition. 4. result = OrderSend(Symbol(), OP_SELL, Lots, Bid, 100, SL, 0, "ATR-Trader", Magic,0,Red); instead of result = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, SL, 0, "ATR-Trader", Magic); 5. In AdjustSLTP() function I have change double SL = NormalizeDouble(Bid - SLparam, Digits); to double SL =Bid - SLparam;// for buy SL = Ask + SLparam;// for sell 6. and lastly If condition used before OrderModify changes made is if (SL < OrderStopLoss()) instead of if (SL < NormalizeDouble(OrderStopLoss(), Digits)) Thanks in advance. |
|
||||
|
Heh... You forgot to mention two important things:
1. Your EA gives OrderSend Error 130. 2. Very important changes of yours: MQL4 Code:
and MQL4 Code:
The first piece of code sets StopLevel to something like 30 (at least with my broker), because you forget to multiply it with Point. The second piece compares the valid stop-loss of about 1.3xxx with 30. Of course 30 is greater than the valid stop-loss and SL becomes = 30. I think you know how to fix that now
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|