kekdge: I am trying to close a Open BUY trade after it goes below 20 pips, but instead it closes after 1 pip.
void OnTick() { double high = High[iHighest(NULL,0,MODE_HIGH,4,1)]; //Close Buy if ((high-Close[1]) <= 20*Point) { if(IsTradeAllowed()) myOrderClose(OP_BUY, 100, ""); else //not autotrading => only send alert myAlert("order", "couldn't close"); }
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 am trying to close a Open BUY trade after it goes below 20 pips, but instead it closes after 1 pip.
Any Suggestion would be greatly appreciated.