fxDreema

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

    Ea Prints 0 instead of printing negative value?

    Questions & Answers
    2
    4
    684
    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.
    • Zackry
      Zackry last edited by

      i am trying to close all running trades from current chart if loss (specific symbol loss) exceeds a certain amount of pips.
      so i did this in order to get negative value of SL and used it in the Check profit unrealized block :
      0_1619332124419_Screenshot_49.png

      the constant SL value is 50 and i am printing the variable sll value on every second in OnTimer Tab, So according to my understanding the printed sll value should be -50 but it prints 0 .

      M 1 Reply Last reply Reply Quote 0
      • M
        miki @Zackry last edited by

        @zackry try to write (0-1)

        Zackry 1 Reply Last reply Reply Quote 0
        • Zackry
          Zackry @miki last edited by

          @miki 0-1? do you mean 0-50 (50 being the value that i want to turn into negative value?)

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

            it was a stupid mistake , i was using the formula block and the check profit block in OnTick tab and since market is close formula block wont get executed and the printing block was in OnTimer block , which was printing the default value stored in variable

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            Online Users

            A
            A
            E
            B
            M
            J
            B

            21
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors