View Full Version : What is wrong with this script?
Why doesn't this script trade when I click on it?
https://www.forexsoutheast.asia/attachments/1518543392326181780.mq4
I just found the answer. It works although I get an error 130.
Ticket=OrderSend(GBPUSD,OP_BUY,0.1,MarketInfo(GBPU SD,MODE_ASK),3,MarketInfo(GBPUSD,MODE_ASK)-20*Stage,MarketInfo(GBPUSD,MODE_ASK) 22*Stage);
Emphasize OrderSend and hit F1.
1) notice the function returns an integer -
That's an important amount - use it
two) tp and sl are at price, not pips
3) use GetLastError
Highlight OrderSend and hit F1.
1) notice the function returns an integer -
that is a significant amount - use it
two) tp and sl are in price, maybe not pips
3) use GetLastError I have uploaded a new script at the very first thread. Have you any idea why that doesnt work?
Insert this following your print announcement:
Printing(err msg: ErrorDescription(GetLastError()));
ps: also, if you're on a 5-digit broker your points won't work.
insert this following your print announcement:
Printing(err msg: ErrorDescription(GetLastError()));
ps: also, if you are on a 5-digit broker your points won't operate. I do not get an error message. I am looking for a 4 digit broker.
https://www.forexsoutheast.asia/attachments/15185433941986971802.mq4
The very first print control changed to an order command and it tells me this is the error. Parameter expected.
The very parm must be symbol
the first parm must be emblem But how can I do that? It works if I write emblem() but it is not the current emblem I need. That's why I use marketinfo.
Ticket=OrderSend(MarketInfo(GBPUSD,MODE_ASK),OP_BU Y,0.1,Ask,3,Ask-20*Point,Ask 22*Point);
ticket=OrderSend(GBPUSD,MarketInfo(GBPUSD,MODE_ASK ),OP_BUY,0.1,Ask,3,Ask-20*Point,Ask 22*Stage);
ticket=OrderSend(MarketInfo(GBPUSD,MODE_ASK),OP_BU Y,0.1,Ask,3,Ask-20*Point,Ask 22*Point);
ticket=OrderSend(GBPUSD,MarketInfo(GBPUSD,MODE_ASK ),OP_BUY,0.1,Ask,3,Ask-20*Point,Ask 22*Stage); I get this error
ERR_INTEGER_PARAMETER_EXPECTED4063Integer parameter expected.
And without any Mistakes
ticket=OrderSend(GBPUSD,OP_BUY,0.1,MarketInfo(GBPU SD,MODE_ASK),3,
MarketInfo(GBPUSD,MODE_ASK)-20*MarketInfo(GBPUSD,MODE_POINT),MarketInfo(GBPUSD ,MODE_ASK) 22*MarketInfo(GBPUSD,MODE_POINT));
Powered by forexsoutheast.asia® Version 4.2.5 Copyright © 2024 forexsoutheast.asia Solutions, Inc. All rights reserved.