Opening positions after X amount of points from bar opening
Please, try to compile your code before posting. You will see where are problems.
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) {
Is this more logical?
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.
Yes, the intention is to open an order if the price is 150 points greater or less than the current bar opening 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?