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
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.