MT4 Script with magic number and currency - page 2

 

That was my first thought. But this option is untick. 

 
RaptorUK:

You probably have it set that way in the options  . . .  untick "Ask manual confirmation"

Or you can also add this, thought its quite funny that after setting some inputs you need some sort of confirmation.

you can add #property show_confirm right after #property show_inputs OR :

Just below

#property show_inputs

Add this 

#include <WinUser32.mqh>

Add right away after

//--------------------------------------------------------------------
int start()
{

add this 

  string txt = " DO NOTHING ";
  if (SELL == true) txt = " open sell ";
  if (BUY  == true) txt = " open buy ";

  if (MessageBox("Wanna"+txt+symbols+" with lot "+DoubleToStr (Lot, 2)+" ???",  // the main text
                 "YOU STILL NOT SURE ???",                                      // the title
                 MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2) != IDYES)              // the buttons
      {
      PlaySound ("wait.wav");
      return (0);
      }
  PlaySound ("alert.wav"); 
 
Tommyboy:

@ phi.nuts

Thank you very much. Now the script works very good. But I need to confirm each order separately in a window. See screenshot. Can I disable this somehow?


You didn't provide a screenshot . . .  if you meant the Script inputs window . . then remove this line from the code.

#property show_inputs
 
Tommyboy: I trade with many different currency pairs and do not want to open a chart every time 
      if (takeprofit!=0) TP = Bid - takeprofit*Point; else TP=0;
Just as you can't use Bid and Ask for other pairs you also can NOT use Point.
 

Thank you very much. Now my Script works very perfect - just as I had hoped it!!

If I want to become a millionaire I will think on your help. :-) I´m happy. One problem less. It´s a good day for trade.

PS: The solution for my last question helped me the way answer from RaptorUk. Of course I spoke about the script input window.

Reason: