fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. enochj
    3. Topics
    E
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 7
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by enochj

    • E

      Including broker commissions?
      Questions & Answers • • enochj

      4
      0
      Votes
      4
      Posts
      1784
      Views

      tcanuto

      Since this option is available to include the commission in the calculations of the cost of an EA? If already available, I can put it as external parameter?

      Until more!

    • E

      Set slippage as a double rather than an int
      Questions & Answers • • enochj

      6
      0
      Votes
      6
      Posts
      2176
      Views

      fxDreema

      In .mq4 code, there is a function named BuyNow (or SellNow for sells):
      http://fxdreema.com/documentation/colle ... ql4/buynow
      http://fxdreema.com/documentation/colle ... l4/sellnow
      Somewhere at the middle of the code there is a "OrderSend" MQL4 function.

      if (IsBrokerECN()!=false || ticket==-1) { ticket=OrderSend(symbol,OP_SELL,lots,bid,slippage, 0, 0,comment,magic,0,arrowcolor);

      see where "slippage" parameter is? Between "bid" and "0". This is int parameter, following this:

      int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)

      They say that this parameter is in point format, for example 3 (when broker is 0.0001 type). I presume that it is internally converted into 0.0003 when 3 is used.

      I have to be honest, I never take care of slippage and I don't know for sure how it should be used. And I think my broker is not a slippage maniac. So you can play in MetaEditor by replacing "slippage" with values in different format to see what works. And if you find the correct format and it is not as in their example (see "3" between "Ask" and "Ask-25"):

      ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);

      please, tell me 🙂

    • E

      BreakEven
      Bug Reports • • enochj

      3
      0
      Votes
      3
      Posts
      1578
      Views

      E

      My pleasure. You did a great job. 😉

    • 1 / 1