patrick007:
Please, try to compile your code before posting. You will see where are problems.
angevoyageur:
Please, try to compile your code before posting. You will see where are problems.
I think it's meant to partially be pseudo code, at least I hope so ;-)
Please, try to compile your code before posting. You will see where are problems.
patrick007:
Thank you. I did try to use the SRC. I know the code doesn't compile. I want to get the bar function right before I continue further.
This is how it should look . .
if (Bar(0) price >200){ OrderSend(Symbol(), OP_BUY, lotSize, Ask,3,stopLoss,magicNumber; lastTrade = Time[0]; return;} else if (Bar(0) price <200){ OrderSend(Symbol(), OP_SELL, lotSize, Bid,3,stopLoss,magicNumber; lastTrade = Time[0]; return; }
Is this more logical?
// Buy Order if(Ask – Open[0] > 150) { // Sell Order if (Open[0]-Bid > 150) {
patrick007:
Nope . . . perhaps you mean 150 points ?
Is this more logical?
RaptorUK:
Nope . . . perhaps you mean 150 points ?
Yes, the intention is to open an order if the price is 150 points greater or less than the current bar opening price.
Nope . . . perhaps you mean 150 points ?
Yes, the intention is to open an order if the price is 150 points greater or less than the current bar opening price.
patrick007:
Yes, the intention is to open an order if the price is 150 points greater or less than the current bar opening price.
OK, then that is what you need to code . . . bear in mind you Open price is a Bid price, so are High, Low and Close, doesn't it make sense to compare Bid with Open ?
Yes, the intention is to open an order if the price is 150 points greater or less than the current bar opening price.
patrick007:
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?
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