Code not fully working

Back to topics list To post a new topic, please log in or register
avatar
2
ArtfulDodger 2015.07.20 12:01
 

Hey guys, 

I am very new to MQL so please don't go hard on me. I started developing a project that trades when I flip a coin. Essentially, when It lands on head it should buy and when it lands on tails it should sell.

The problem is when I back-test the code, it only buys and dosen't sell.


Attached files:
  projectcoin.mq4  (1.95 KB)
avatar
Moderator
3408
GumRai 2015.07.20 12:16 #
 

You are trying to place sell orders at Ask, They must be at Bid.

If you checked for errors, you would probably have found this.

OrderSend() returns an int not a bool 

avatar
12988
avatar
2
ArtfulDodger 2015.07.28 04:20 #
 
Thank you very much guys
Back to topics list  

To add comments, please log in or register