Position Comment Reliability : open positions

 

Hi,

I need to embed some data about positions I open, inside its comment.
then on some other parts of code, need to retrieve the comment of OPEN POSITIONS, and modify each open position based on it's comment data (like it's signal category, it's signal reliability etc.)

I know position comment is not a reliable place to store something in it, cause some brokers change it when closure happens.

  • but has anyone ever seen any broker change the comment of a open position (while it's still open of course)?
  • also, is it safe to assume " if OrderSend()... and server return values indicate successful order placement, then comment is set for that position certainly " ?
    (i.e. when opening positions, is the comment being set to a position successfully, considered as a factor for functions and server success returns ?)


please don't offer using structures and arrays to store each position data while EA is active , or any other method of keeping a record of open positions data in RAM or File.

THANKS

 
Code2219 or probably 2319:

Hi,

I need to embed some data about positions I open, inside its comment.
then on some other parts of code, need to retrieve the comment of OPEN POSITIONS, and modify each open position based on it's comment data (like it's signal category, it's signal reliability etc.)

I know position comment is not a reliable place to store something in it, cause some brokers change it when closure happens.

  • but has anyone ever seen any broker change the comment of a open position (while it's still open of course)?
I didn't see it. However the question should be : is it possible for a broker to change the comment of an open position ? The answer is most probably yes (not 100% sure, only MQ and brokers could say it for sure). So come the next question ? Can you live with that when it will happen ?
  • also, is it safe to assume " if OrderSend()... and server return values indicate successful order placement, then comment is set for that position certainly " ?
    (i.e. when opening positions, is the comment being set to a position successfully, considered as a factor for functions and server success returns ?)

In normal situation yes. But can we be sure it's always the case ? I don't know. You should ask to Metaquotes.

 
  • any broker change the comment of a open position (while it's still open of course)?
  • also, is it safe to assume " if OrderSend()... and server return values indicate successful order placement, then comment is set for that position certainly " ?
    (i.e. when opening positions, is the comment being set to a position successfully, considered as a factor for functions and server success returns ?)

Yes, every time you use closeby to modify a position.

Never assume anything when it comes to MT.