Hi everybody i am new in codding but yesterday i convert two indicators in expert advisors.Unfortunately they don't work.I really need help.
Files:
fibocalculator.mq4
9 kb
ichiexpertadvisor.mq4
9 kb
- Why this EA dont work?
- SIMPLE-MACD-EA : An extremely simple EA based on 2 channels of MACD. Try it!
- Custom Indicator - which one?
if (EachTickMode && Bars != BarCount) TickCheck = False;
Bars will normally be a constant once the history limit is reached. Use:static datetime Time0; newBar = Time[0] > Time0; if (!newBar) return; Time0 = Time[0];
for (int i = 0; i < Total; i ++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
Always count DOWN when closing orders. Always check orderSelectOrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
for(int index = OrdersTotal() - 1; index >= 0; index--) if ( OrderSelect(index, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == MagicNumber // my magic number && OrderSymbol() == Symbol() ) { // and period and symbol //...
OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange);
If you are using a 5 digit broker, then a pip is not a point. All pip variables (TrailingStop) and point variables (Slippage) must be adjusted, either by the user or by the EA:double pips2points, // slippage 3 pips 3=points 30=points pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init() { if (Digits == 5 || Digits == 3) { // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; }
WHRoeder:
Bars will normally be a constant once the history limit is reached. Use: Always count DOWN when closing orders. Always check orderSelect If you are using a 5 digit broker, then a pip is not a point. All pip variables (TrailingStop) and point variables (Slippage) must be adjusted, either by the user or by the EA:
Bars will normally be a constant once the history limit is reached. Use: Always count DOWN when closing orders. Always check orderSelect If you are using a 5 digit broker, then a pip is not a point. All pip variables (TrailingStop) and point variables (Slippage) must be adjusted, either by the user or by the EA:

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register