fxDreema

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

    "Adjust" field in Condition block error

    Questions & Answers
    2
    7
    1817
    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.
    • J
      james last edited by

      I keep getting a compile error when specifying +Npips or -Npips in the "Adjust" field in the Condition block. That said, just occasionally it works! 🙂

      Here's the extract from MetaEditor:

      __')' - parameter expected C:\MetaTrader 4\experts\type 3 v1.mq4 (2331, 114)
      [/quote:137a3c2w]

      	/////////////////////////////////////////////////////////////
      	// Code of block #2460 (BuySig) //
      	void block2460(string _parent_="")
      	{if (block2460==false) {return;}
      		int crossover=0;
      		int crosswidth=1;
      		bool o1=false, o2=false;
      		
      		for (int i=0; i<=crossover; i++) {
      		   // i=0 - normal pass, i=1 - crossover pass
      		   IndicatorMoreShift(true,i*crosswidth);
      		   
      		   // Left operand of the condition
      		   double Lo=candles_candles("iClose", 1, CurrentSymbol(), CurrentTimeframe());
      		   // Right operand of the condition
      		   double Ro=(indicators_iMA(180, 0, MODE_SMA, PRICE_CLOSE, CurrentSymbol(), CurrentTimeframe(), 1)-toDigits(2,));
      		   
      		   if (SkipThePass()==true) {return;}
      		   // Conditions
      		   if (Lo<Ro) {if(i==0){o1=true;}}else{if(i==0){o2=true;}else{o2=false;}}
      		   if (crossover==1) {if (Ro<Lo) {if(i==0){o2=true;}}else{if(i==1){o1=false;}}}
      		}
      		// Outputs
      		if (o1==true) {block698("2460");} else if (o2==true) {/* Yellow output */}
      	}
      
      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        Fixed

        1 Reply Last reply Reply Quote 0
        • J
          james last edited by

          Excellent, as always! 🙂 Thank you.

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

            Yes, and I think that is excellent to do something, then to broke it and fix it... and again, if that is not enough 😕

            1 Reply Last reply Reply Quote 0
            • J
              james last edited by

              Did you upload a fresh 047 with the fix? I just downloaded 047 again, and I still seem to have the problem! 🙂

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

                No... but how do I know if someone uses the local version or the web...

                Well, I also found another bug, so build 048 is expected soon, but I also started to reorganize categories in "Condition" and adding some pictures inside, and I'm not finished with this.

                1 Reply Last reply Reply Quote 0
                • J
                  james last edited by

                  Got 048 local version now. Thank you again! 🙂

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

                  Online Users

                  M
                  M
                  S
                  G
                  E
                  N
                  A
                  C
                  M
                  M
                  M
                  E

                  22
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors