georgecheng:
Anyone can advice me, what i lack off in this script? I wanted the script to prompt me how much lot i want for this trade, but once i excute this trade, it just self excute without prompt. I insert the "extern" but still no use, did i use at the right way? Sorry, still new to programming and keep asking a lot question in the forum. Thanks
extern double Lots = 0.1;
int start()
{
int ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"expert comment",255,0,Green);
if(ticket<1)
{
int error=GetLastError();
Print("Error = ",ErrorDescription(error));
return;
}
OrderPrint();
return(0);
}
Add this line on the top of script:
#property show_inputs
thanks for the advice. it works.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Anyone can advice me, what i lack off in this script? I wanted the script to prompt me how much lot i want for this trade, but once i excute this trade, it just self excute without prompt. I insert the "extern" but still no use, did i use at the right way? Sorry, still new to programming and keep asking a lot question in the forum. Thanks
extern double Lots = 0.1;
int start()
{
int ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"expert comment",255,0,Green);
if(ticket<1)
{
int error=GetLastError();
Print("Error = ",ErrorDescription(error));
return;
}
OrderPrint();
return(0);
}