Page 6 of 11 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 104
  27 27 Attachment(s)    

Thread: OpenTiks Expert Advisor

  1. #51
    Junior Member sergey13's Avatar
    Join Date
    Jan 2009
    Posts
    13

    Default

    Funyoo
    Can you modify stop loss and trailing stop method in this EA??? ATR method is better to my mind.
    thanks

  2. #52
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by sergey13 View Post
    Funyoo
    Can you modify stop loss and trailing stop method in this EA??? ATR method is better to my mind.
    thanks
    Hi sergey13,

    At line 95, replace this :

    Code:
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-(StopLoss*Point),0,"OpenTiks_Buy",magicnumber,0,Green);
    By that :

    Code:
    OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-iATR(NULL,0,ATRPeriod,0),0,"OpenTiks_Buy",magicnumber,0,Green);
    At line 106, replace this :

    Code:
    OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+(StopLoss*Point),0,"OpenTiks_Sell",magicnumber,0,Red);
    By that :

    Code:
    OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+iATR(NULL,0,ATRPeriod,0),0,"OpenTiks_Sell",magicnumber,0,Red);
    At line 124, 126, 128, 143, 145 and 147, replace this

    Code:
    Point*trldistance
    By that :

    Code:
    iATR(NULL,0,ATRPeriod,0)
    At line 21, add this :

    Code:
    extern int ATRPeriod=14;

  3. #53
    Junior Member sergey13's Avatar
    Join Date
    Jan 2009
    Posts
    13

    Default

    thank you

    Code:
    extern int    TrailingStop   = 30;
    extern int    StopLoss       = 0;
    I can set any value to TrS and S/L (of course != 0) to activate ATR method???

  4. #54
    Junior Member sergey13's Avatar
    Join Date
    Jan 2009
    Posts
    13

    Default

    Sorry, but why i can't replace trldistance at 119 line?
    Code:
    void TrailingStairs(int ticket,int trldistance)

  5. #55
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by sergey13 View Post
    thank you

    Code:
    extern int    TrailingStop   = 30;
    extern int    StopLoss       = 0;
    I can set any value to TrS and S/L (of course != 0) to activate ATR method???
    You are right, you have to put a value above 0 for both.

    Quote Originally Posted by sergey13 View Post
    Sorry, but why i can't replace trldistance at 119 line?
    Code:
    void TrailingStairs(int ticket,int trldistance)
    You can delete this (at line 119) :

    Code:
    ,int trldistance

  6. #56
    Junior Member sergey13's Avatar
    Join Date
    Jan 2009
    Posts
    13

    Default

    I think iATR(NULL,0,ATRPeriod,1)

  7. #57
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by sergey13 View Post
    I think iATR(NULL,0,ATRPeriod,1)
    If you prefer.

  8. #58
    Junior Member sergey13's Avatar
    Join Date
    Jan 2009
    Posts
    13

    Default

    When I try to delite
    Code:
    ,int trldistance
    I see: ')' - wrong parameters count (67, 51)
    Code:
    TrailingStairs(OrderTicket(),TrailingStop);

  9. #59
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by sergey13 View Post
    When I try to delite
    Code:
    ,int trldistance
    I see: ')' - wrong parameters count (67, 51)
    Code:
    TrailingStairs(OrderTicket(),TrailingStop);
    In this line :

    Code:
    TrailingStairs(OrderTicket(),TrailingStop);
    You have to delete the second parameter :

    Code:
    ,TrailingStop

  10. #60
    Junior Member sergey13's Avatar
    Join Date
    Jan 2009
    Posts
    13

    Default

    You are god in MQL4. thank you.

Similar Threads

  1. The BEST Expert Advisor on the market, WallStreet Expert Advisor
    By Jacob Godly in forum Commercial expert advisors
    Replies: 0
    Last Post: 03-21-2013, 13:05
  2. Enable/Disable Expert advisor Button By Expert advsior
    By Trint in forum Ideas for expert advisors
    Replies: 1
    Last Post: 10-18-2010, 10:41
  3. OpenTiks Expert Advisor
    By funyoo in forum Expert advisors live statements
    Replies: 11
    Last Post: 02-20-2009, 20:49
  4. SAR ADX Expert Advisor
    By funyoo in forum Expert advisors live statements
    Replies: 0
    Last Post: 02-10-2009, 13:27

Tags for this Thread

100, 100$, advisor, alpari, alpari uk, backtest, backtesting, beginner, broker, candle, change, coding, color, demo, deposit, download link, ea works, elite, eur, eur/usd, eurjpy, eurusd, ex4, expert, expert advisor, expert advisors, experts, forex, free, free ea, high, indicator, indicators, live, live account, low, macd, magic, manual, martingale, metatrader, mql, mql4, mt4, oscillator, profit, profitable, profitable expert advisor, programming, real, robots, rsi, signal, slippage, stoch, stochastic, stop, stoploss, strategy, support, system, test, thank you, time, timefilter, trading, trailing, trailingstop, trend, usd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •