fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    as price fraction

    Questions & Answers
    2
    2
    947
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      toddolar last edited by

      hi
      im trying to get total loss of pips in the attached sample but, as price fraction (open to close price) does not include the spread
      if i change to pips it dont work
      any idea how to add spread

      thanks

      ......
      unnamed.mq4

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        open-to-close price is the difference between Open Price and Close Price when the trade was closed, so you should use "For each Closed Trade" here. Otherwise I think that Close Price is the current price, if not 0 (I don't remember exactly).

        Both prices are the real prices where the trade opened and closed, so the spread is probably somewhere in there. Well, not the current spread, but the one that was in those events.

        The spread is available somewhere else in Condition, somewhere under Market properties again as price fraction (ask - bid). Otherwise as MQL4 code it is:

        MarketInfo(Symbol(), MODE_ASK) - MarketInfo(Symbol(), MODE_BID)
        

        But do you really need that...

        There is something else, but this returns points which are probably not really useful in fxDreema. If the spread is 2 pips, it will return 20 🙂 Again, if I remember correctly 🙂

        MarketInfo(Symbol(), MODE_SPREAD)
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        Online Users

        A
        S
        K
        M
        R
        D
        S
        B

        14
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors