1. Is name defined globally as a string ?
2. Get a better Broker. Modifying your orders on every tick, if you have many orders, is going to be a problem. You can attempt to do it in code, sure, it's not difficult.
1. Is name defined globally as a string ?
2. Get a better Broker. Modifying your orders on every tick, if you have many orders, is going to be a problem. You can attempt to do it in code, sure, it's not difficult.
Hi again, RaptorUK
I hope you are doing well :-)
1. I just tried to define name as a string globally or inside void DeleteLines() function but still got same result. The indicator can't delete all the lines as I expected.
2. What brokers you may know to better solve my concern, RaptorUK? Can you please write a sample codes about how to modify pending orders every ticks?
Thanks so much !!!
- You MUST count down when deleting.
- Stop using pending orders, wait for price to reach and open.
- You MUST count down when deleting.
- Stop using pending orders, wait for price to reach and open.
Hi WHRoeder,
1. I tried your comment and the indicator seems work nicely.
Replace
for(int i4 = 0; i4 <= obj_total4; i4++)
With this working fine
for(int i4 = obj_total4; i4 >=0; i4--)
2. Can you please write a sample codes on how to wait for price to reach and open? My requirement is only one trade will be opened when new bar appears. Thanks so much, WHRoeder !!!
My requirement is only one trade will be opened when new bar appears.
int start(){ static datetime Time0; bool newBar = (Time0 != Time[0]); Time0 = Time[0]; static double openPrice, DIR; if (newBar){ openPrice = 0; // Assume don't open : if (wantToOpen){ openPrice = .. // Open when Bid goes above/below DIR = .. // +1/-1 } } if (openPrice != 0 && (Bid - openPrice)*DIR > 0){ // Market above/below price - time to open. } }
Dear experts,
1/ FIRST PROBLEM:
My using indicator will draw many vertical lines and horizontal lines so to keep them in order I want to delete all these lines right after I added it (int INIT phase) then let it draws again (int START phase). But in that INIT phase, indicator can't delete all lines but just a few of them. I attached the code below for your comments please ....
2/ SECOND PROBLEM:
I wrote an EA to place orders automatically everytimes when new Bar appears. But these orders are PENDING ones so they are with FIXED entry points while brokers' spreads keep changing every ticks, especially during specific market conditions spreads can be WIDEN up to few tens pips. So my EA placed PENDING orders with FIXED entry points, stop and target levels CAN'T BE UPDATED along with THE CHANCE OF SPREADS EVERY TICK. So my question is, is there anyway for EA to frequently modify my PENDING ORDERS every ticks?
Thanks so much for your help !!!
There is something weird here...
cuz... if you DELETE a line, the counter will be -1 ... how u pretent to run the last object ?
for
exemplo
O1 - id 1
O2 - id 2
O3 - id 3
if we delete Object1 (id 1)
the Object 2 will assume the ID 1... so
in the next loop you will delete ID 2 and the ID 1 will remain....
Its a array.... when you delete a position, the position counter
change...
3 | 2 | 1 (WILL DELETE) | 0 |
---|---|---|---|
Object 4 | Object 3 | Object 2 | Object 1 |
2 | 1 | 0 |
---|---|---|
Object 4 | Object 3 | Object 1 |
You should to delete the first object while type OBJ_HLINE exist...
Am i right?
ObjectsDeleteAll
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear experts,
1/ FIRST PROBLEM:
My using indicator will draw many vertical lines and horizontal lines so to keep them in order I want to delete all these lines right after I added it (int INIT phase) then let it draws again (int START phase). But in that INIT phase, indicator can't delete all lines but just a few of them. I attached the code below for your comments please ....
2/ SECOND PROBLEM:
I wrote an EA to place orders automatically everytimes when new Bar appears. But these orders are PENDING ones so they are with FIXED entry points while brokers' spreads keep changing every ticks, especially during specific market conditions spreads can be WIDEN up to few tens pips. So my EA placed PENDING orders with FIXED entry points, stop and target levels CAN'T BE UPDATED along with THE CHANCE OF SPREADS EVERY TICK. So my question is, is there anyway for EA to frequently modify my PENDING ORDERS every ticks?
Thanks so much for your help !!!