It opens orders, but not after 150 point change. I can't suss out what it is doing other than going bust. I just want to get the EA together to see if there is any profit to be made from large movements in 1 minute. Obviously, it would apply to other currencies also, as these movements tend to be mirrored. It would not trade often and a trailing stop loss would be essential. I will keep at it. Thanks.
RaptorUK: Wasn't this a big enough hint ? I am not PC Plod and I am bad at cluedo and even worse at pseudo. Whether 15/100 or 150/1000 it isn't functioning correctly. It opens orders on the first bar irrespective of change from opening price. Thanks.
I am not PC Plod and I am bad at cluedo and even worse at pseudo. Whether 15/100 or 150/1000 it isn't functioning correctly. It opens orders on the first bar irrespective of change from opening price. Thanks.
So why not use what you actually mean to code in the first place . . . what does 150/100 or 150/1000 mean ? why not use 150 * Point ?
Apart from the obvious comments like "give up, Son", this won't open orders. The order close error 4051 appears in the journal. Is the open order illogical too?
Apart from the obvious comments like "give up, Son", this won't open orders. The order close error 4051 appears in the journal. Is the open order illogical too?
When you have problems with a function you need to check you are using it correctly, have you checked ? have you read the documentation ? OK you haven't, but why not ? it would take you 2 minutes . . . instead you wait for a reply, I don't mind helping but you can help yourself much, much quicker and learn in the act of doing so . . .
now read the documentation: click the links here OrderTicket()OrderLots()OrderSymbol() there is very little to read about these three functions, this is what they have in common
"Note: The order must be previously selected by the OrderSelect() function."
. . . where is your OrderSelect() call to select the order that you want to know the Ticket Number, Position Size and Symbol for ?
You OP_BUY at Ask, no other price, you OP_SELL at Bid, no other price. Read the documentation: OrderSend() you are trying to buy at Ask + pointFact *Point
When you have problems with a function you need to check you are using it correctly, have you checked ? have you read the documentation ? OK you haven't, but why not ? it would take you 2 minutes . . . instead you wait for a reply, I don't mind helping but you can help yourself much, much quicker and learn in the act of doing so . . .
Take one of your OrderClose() calls . . .
now read the documentation: click the links here OrderTicket()OrderLots()OrderSymbol() there is very little to read about these three functions, this is what they have in common
"Note: The order must be previously selected by the OrderSelect() function."
. . . where is your OrderSelect() call to select the order that you want to know the Ticket Number, Position Size and Symbol for ?
You OP_BUY at Ask, no other price, you OP_SELL at Bid, no other price. Read the documentation: OrderSend() you are trying to buy at Ask + pointFact *Point
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
pseudo-code should envelope all variables in the equation and yours seems illogical because its possibly missing some information.
your intention is to open orders when price is greater or lesser than current bar open price, so what is compared?
bar zero open price &
pseudo-code should envelope all variables in the equation and yours seems illogical because its possibly missing some information.
your intention is to open orders when price is greater or lesser than current bar open price, so what is compared?
bar zero open price & what?
Bar opening price plus or minus 150 points.
Does that work on EURUSD ?
Nope . . . perhaps you mean 150 points ?
Wasn't this a big enough hint ?
I am not PC Plod and I am bad at cluedo and even worse at pseudo. Whether 15/100 or 150/1000 it isn't functioning correctly. It opens orders on the first bar irrespective of change from opening price. Thanks.
I am not PC Plod and I am bad at cluedo and even worse at pseudo. Whether 15/100 or 150/1000 it isn't functioning correctly. It opens orders on the first bar irrespective of change from opening price. Thanks.
So why not use what you actually mean to code in the first place . . . what does 150/100 or 150/1000 mean ? why not use 150 * Point ?
Apart from the obvious comments like "give up, Son", this won't open orders. The order close error 4051 appears in the journal. Is the open order illogical too?
Apart from the obvious comments like "give up, Son", this won't open orders. The order close error 4051 appears in the journal. Is the open order illogical too?
When you have problems with a function you need to check you are using it correctly, have you checked ? have you read the documentation ? OK you haven't, but why not ? it would take you 2 minutes . . . instead you wait for a reply, I don't mind helping but you can help yourself much, much quicker and learn in the act of doing so . . .
Take one of your OrderClose() calls . . .
now read the documentation: click the links here OrderTicket() OrderLots() OrderSymbol() there is very little to read about these three functions, this is what they have in common
"Note: The order must be previously selected by the OrderSelect() function."
. . . where is your OrderSelect() call to select the order that you want to know the Ticket Number, Position Size and Symbol for ?
Why does your OrderSend() fail ? What are Function return values ? How do I use them ?
You OP_BUY at Ask, no other price, you OP_SELL at Bid, no other price. Read the documentation: OrderSend() you are trying to buy at Ask + pointFact *Point
When you have problems with a function you need to check you are using it correctly, have you checked ? have you read the documentation ? OK you haven't, but why not ? it would take you 2 minutes . . . instead you wait for a reply, I don't mind helping but you can help yourself much, much quicker and learn in the act of doing so . . .
Take one of your OrderClose() calls . . .
now read the documentation: click the links here OrderTicket() OrderLots() OrderSymbol() there is very little to read about these three functions, this is what they have in common
"Note: The order must be previously selected by the OrderSelect() function."
. . . where is your OrderSelect() call to select the order that you want to know the Ticket Number, Position Size and Symbol for ?
Why does your OrderSend() fail ? What are Function return values ? How do I use them ?
You OP_BUY at Ask, no other price, you OP_SELL at Bid, no other price. Read the documentation: OrderSend() you are trying to buy at Ask + pointFact *Point
Thank you for your reply. All very helpful.