Ordersend - (error -1)

Back to topics list To post a new topic, please log in or register
avatar
3
mohdsyuk88 2016.01.04 05:10
 

Hi

I am running my EA on FBS metatrader platform. the demo account can work but the real account not working

However, I just cannot open a position with Ordersend.

my code is like this

int value = OrderSend(Symbol(),OP_SELL,0.01,Bid,10,0,skimProfit,"sell",magic,0,Yellow);   

Error Ordersend(-1): lot-size: 0.01

What is wrong with the order?

Thanks!!

avatar
Moderator
3423
GumRai 2016.01.04 06:11 #
 

Where does skimProfit get its value from?

When the order fails

Print(GetLastError())

So you know the reason for the failure

avatar
3
mohdsyuk88 2016.01.04 07:42 #
 
GumRai:

Where does skimProfit get its value from?

When the order fails

So you know the reason for the failure


 double skimProfit = NormalizeDouble(Ask - 10 * Point * 10,Digits);

the print show for last error is

ticket return is -1

GetLastError() is  4112


in the demo account for beck test is ok, but in real account return -1 value,

i need your help,

thank you.

avatar
3
mohdsyuk88 2016.01.04 08:24 #
 
mohdsyuk88:


 double skimProfit = NormalizeDouble(Ask - 10 * Point * 10,Digits);

the print show for last error is

ticket return is -1

GetLastError() is  4112


in the demo account for beck test is ok, but in real account return -1 value,

i need your help,

thank you.

I Found the reason the trader server block automatic trading.. should ask the broker then


thank you for your help

Back to topics list  

To add comments, please log in or register