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 can't read ex4 files. Why don't you attach the mql4 file or paste your entire code. Please don't offer to send it to me via email either. The code I provided as example for drawing vertical line when EA buys or sells. It's not designed to make your EA logic work properly.
Your code:
Is different from mine:
I'll leave the trouble shooting up to you. Also keep in mind it's not a good idea to make the magic# 007. Use just 7 or any other integer without preceding 00.
you have to set the MagicNumber in the OrderSend() function
I did try to change it to the same but no different result.
And one more question.
I did try to change OP_BUY to OP_BUYSTOP and the other alternative but it to made the draw lines go away but now it made the trades at the right point.
Do "ObjectCreate" need to have any OP_BUYSTOP or the alternative I want it to have?
Try using Zzuegg suggestion for magic#
IFRC, we are creating the object based on the fact that Ticket has gone from 0 to greater than 0 based on the fact that when Op_Buy works it returns the Ticket number which is greater than 0. I don't think OP_BUYSTOP returns a Ticket#. You'll want to look at the Documentation and review what OP_BUYSTOP returns and use Arguments against that.
To check the Docs, do a search within Meta_Editor. Again without seeing your Logic, I cannot tell where the problem really is.
Try using Zzuegg suggestion for magic#
IFRC, we are creating the object based on the fact that Ticket has gone from 0 to greater than 0 based on the fact that when Op_Buy works it returns the Ticket number which is greater than 0. I don't think OP_BUYSTOP returns a Ticket#. You'll want to look at the Documentation and review what OP_BUYSTOP returns and use Arguments against that.
To check the Docs, do a search within Meta_Editor. Again without seeing your Logic, I cannot tell where the problem really is.
hi, of course OP_BUYSTOP returns a ticket number, but i assume he is using the current Ask/Bid as OpenPrice, so he most likely will get a "INVALID STOP" error.
btw, ticket number could also be 0. so use TicketNr>=0
//z
what where you trying to do?
OrderSend() has nothing to do in the updateValue() function.
i assume you want only drawn lines when your EA opens a new order, send me the EA via pm or email and i will add this.
Buy you have realy messed up the code ;)
but good that you are trying