fxDreema

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

    Compilation error on web fxdreema

    Bug Reports
    2
    2
    538
    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.
    • D
      DarK last edited by

      Hi,

      Constantly getting l0ca1_ in front every gridstart

      //-- open price -------------------------------------------------------------
      double op=0;
           if (l0ca1_GridStart=="ask") {op=SymbolAsk();}
      else if (l0ca1_GridStart=="bid") {op=SymbolBid();}
      else if (l0ca1_GridStart=="mid") {op=(SymbolAsk()+SymbolBid())/2;}
      else if (l0ca1_GridStart=="function") {op=_value(0);}
      op=op-toDigits(l0ca1_GridStartOffset);
      

      This is only happening if i put Variables instead of original values.

      BR

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

        Is there error otherwise? I fixed some problem yesterday, but who knows, maybe another is introduced?

        The idea is that when a global variable is used in block, and that variable is with the same name with some local variable for this block (each block is a function in MQL4), then the local variable is prefixed with this "l0ca1_" thing.
        In your case, in the block is used variable named "GridStart", and you probably had Variable with the same name, so to not mix them in the function the one that is local is renamed everywhere in that function.

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

        Online Users

        K
        S
        V
        M

        13
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors