OrderClosePrice() or Bid/Ask? - page 3

 
anuj71 #:

This is correct


So, it always good to use Ask/Bid instead of OrderClosePrice()?


Boyko, saying OrderClosePrice is not good approach.

If you write tipe casting? (a: b)

Check in mql5 order close or orderSend

 
Vladislav Boyko #:
I will try to place SL, TP and pending orders “within” the tick size

Yes, I get a modification error on AUDCAD if SL/TP is normalized to point instead of tick size.

2024.04.08 04:58:08.832 modification of order #1241592742 buy 1.00 AUDCAD at 0.89550 sl: 0.88550 tp: 0.00000 -> sl: 0.88549 tp: 0.00000 failed [Invalid S/L or T/P]
2024.04.08 04:58:08.645 modify order #1241592742 buy 1.00 AUDCAD at 0.89550 sl: 0.88550 tp: 0.00000 -> sl: 0.88549 tp: 0.00000
2024.04.08 04:57:22.511 order #1241592742 buy 1.00 AUDCAD at 0.89550 was modified -> sl: 0.88550 tp: 0.00000
2024.04.08 04:57:22.370 modify order #1241592742 buy 1.00 AUDCAD at 0.89550 sl: 0.00000 tp: 0.00000 -> sl: 0.88550 tp: 0.00000

Thank you, William Roeder!