u trying to move the s & r lines or move the order ?
for moving the s & r lines
ObjectSet("object name", OBJPROP_PRICE1, the new price value);
for moving the order if its a pending order u need to delelte it & send a new one,
if the order is already executed u need to close it first, and then send the new one
Hi,
I'm coding an "EA" (not full automatic), the idea is that i create 1 support and 1 resistance (both are angled, not horizon). Both lines is created in init() area and by extern input (time and price). If price touch line EA will place an order with setting stoploss and target profit.
Read this: https://www.mql5.com/en/forum/144875
You can't create an Object that already exists . . . move it using ObjectMove or ObjectSet()
@Raptor
Thank you for the link
u trying to move the s & r lines or move the order ?
for moving the s & r lines
for moving the order if its a pending order u need to delelte it & send a new one,
if the order is already executed u need to close it first, and then send the new one
moving pending order is better than moving prices, tks you for the advice
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm coding an "EA" (not full automatic), the idea is that i create 1 support and 1 resistance (both are angled, not horizon). Both lines is created in init() area and by extern input (time and price). If price touch line EA will place an order with setting stoploss and target profit.
However, when i run EA, it can create support and resistance lines, 2 horizontal-ask-lines cross the support and resistance at time of the last candle. The problem is that when the next candle comes, 2 horizontal-ask-lines don't move along with the current bar (bar 0). I guess i need some kind of refresh or loop or something else.
I'm a newbie, my "EA" is funny thing, i guess. Anyway I really do hope someone could give me some valuable advice. Thank you very much
my set up in start() are as follows: