How to mark with arrow, all Open Orders on a chart, at the open of the bar and not at OrderOpenPrice?
davidb_012:
Use iBarShift() and Open[] or iOpen()
I can't work out how to get the Open() value for a bar from the OrderOpenTime. Any ideas?
David
Thanks RaptorUK, that helped. Got it sorted with iBarShift as below.
int shift = iBarShift(0,0,OrderOpenTime()); //ObjectCreate("e" + i, OBJ_ARROW, 0, OrderOpenTime(), OrderOpenPrice()); // Original //ObjectCreate("ep" + i, OBJ_ARROW, 0, OrderOpenTime(), OrderOpenPrice()); // Original ObjectCreate("e" + i, OBJ_ARROW, 0, Time[shift], Open[shift]); ObjectCreate("ep" + i, OBJ_ARROW, 0, Time[shift], Open[shift]);
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'm trying to show on a chart, an arrow for each open trade. However, I want it to appear at the open of the bar it occurred, and not at the actual OrderOpenPrice.
I have a script (attached) that puts an arrow and price box at the OrderOpenTime (great), but puts it at the OrderOpenPrice. I want it to be showing at the open of the bar.
I can't work out how to get the Open() value for a bar from the OrderOpenTime. Any ideas?
David