if (Bid >= BuyPrice2 && total<2); // Do nothing OrderSend (Symbol(),OP_BUYLIMIT,Lots,BuyPrice2,0,0,0,NULL,0,clrNONE); // Buy order every tick
- Also note that in total<2, total has not changed.
- Check your return codes. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Thanks for your help, its working fine now. :)
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
I have a certain condition in code where I define the BuyPrice
Now my problem is that first if condition send only one buy limit order as required buy in second if condition it fires buy order on every tick. I cant seem to figure out what iss wrong :(