Script not working in Windows 8 - page 2

 
chuale:
anyone has the same experience as me, meaning script not working under windows 8 environment.
Post your code . . . attach it as a file or post using the SRC button.
 
RaptorUK:
Post your code . . . attach it as a file or post using the SRC button.

//+-----------------------------------------------------------------+
//|1-Click Buy Order.mq4 |
//+------------------------------------------------------------------+

double lots = 1.0;
double profsize = 1000;
double stopsize = 250;

int ticket;
double stop;
double prof;
int start()
{
ticket=OrderSend(Symbol(), OP_BUY, lots, Ask, 3, 0, 0);
stop=(Ask-stopsize*Point);
prof=(Ask+profsize*Point);
OrderModify( ticket, OrderOpenPrice(), stop, prof, 0, Blue);
return(0);
}
 

the same code work on win 7 and xp.

TQ

 
chuale:
//+-----------------------------------------------------------------+
//|1-Click Buy Order.mq4 |
//+------------------------------------------------------------------+

double lots = 1.0;
double profsize = 1000;
double stopsize = 250;

int ticket;
double stop;
double prof;
int start()
{
ticket=OrderSend(Symbol(), OP_BUY, lots, Ask, 3, 0, 0);
stop=(Ask-stopsize*Point);
prof=(Ask+profsize*Point);
OrderModify( ticket, OrderOpenPrice(), stop, prof, 0, Blue);
return(0);
}

What Error# or Messages are you receiving?

Try using some DeBugging Techniques. Like Alert || Print || Comment || GetLastError().

Use the Full OrderSend Parameters. Even I cannot tell which are Optional in the Above.

Oh and use the SRC button when posting codes. Makes it easier to read.

 
chuale:

the same code work on win 7 and xp.

TQ

I did ask you . . .

RaptorUK:
Post your code . . . attach it as a file or post using the SRC button.

Please edit your post above . . . please use the SRC button to post code: How to use the SRC button.


Also read and implement this: What are Function return values ? How do I use them ?

 
//+-----------------------------------------------------------------+
//|1-Click Buy Order.mq4 |
//+------------------------------------------------------------------+

double lots = 1.0;
double profsize = 1000;
double stopsize = 250;

int ticket;
double stop;
double prof;
int start()
{
ticket=OrderSend(Symbol(), OP_BUY, lots, Ask, 3, 0, 0);
stop=(Ask-stopsize*Point);
prof=(Ask+profsize*Point);
OrderModify( ticket, OrderOpenPrice(), stop, prof, 0, Blue);
return(0);
}
There isnt any error when compiled. I suspect it is caused by UAC issue.
 
chuale: There isnt any error when compiled. I suspect it is caused by UAC issue.

My UAC is turned Off and it compiled fine for me.

You need to eliminate the simple stuff first when trouble_shooting.

Why jump to UAC when that OrderSend() is suspect.

Please follow the recommendations we're providing.

Ps> It's the weekend now, and Markets are closed, retest on Monday.

 
chuale:
There isnt any error when compiled. I suspect it is caused by UAC issue.

What error do you get from the trading functions ? did you read this ? What are Function return values ? How do I use them ? please post your modified code to show that you did.

On your Windows 8 MT4 Terminal . . . did you allow live trading ?

 
chuale: Hello, I just installed MT4 in windows 8 and found that script not working, please help me.

I had problems getting mt4 to work properly in windows 8 after transferring everything from win7. On restart it wouldn't remember the demo account. I had to:

  1. Install outside of \program files (done by the transfer)
  2. Disable UAC
  3. Run mt4 as administrator. (Change shortcut properties)
 
RaptorUK:

What error do you get from the trading functions ? did you read this ? What are Function return values ? How do I use them ? please post your modified code to show that you did.

On your Windows 8 MT4 Terminal . . . did you allow live trading ?


Thank You, it works now as I forgot to click on "allowlive trading".

Thanks again.

Reason: