PDA

View Full Version : What is wrong with this script?



Ameras
09:40,
Why doesn't this script trade when I click on it?
https://www.forexsoutheast.asia/attachments/1518543392326181780.mq4

Ameras
22:53,
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);

serdio89astu
00:14,
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

Ameras
01:35,
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?

serdio89astu
02:56,
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.

Ameras
04:17,
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

Ameras
05:37,
The very first print control changed to an order command and it tells me this is the error. Parameter expected.

serdio89astu
06:58,
The very parm must be symbol

Ameras
08:19,
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.

serdio89astu
09:40,
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);

Ameras
11:00,
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.

Ameras
12:21,
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));