Making an EA to manage user opened trades

 

I've recently started programming an EA not having any previous experience and have had some success in making it work as intended only to realize that interaction with the EA will be more difficult than I thought. What I am trying to accomplish is as follows:

1) have an EA that opens, manages and closes trades

2) allow the user open trades and "tell" the expert if it should manage them or not

I decided to use the OrderComment() function to check if the trade should be managed by the EA or not. For example, if the user has opened a trade that contains the comment "manage" the EA will start managing this trade as one of its own. In order to do so I wanted to assign the EA-specific MagicNumber to that trade, I think this won't be possible because one cannot assign a MagicNumber to a trade that has already been opened (or at least I coudn't find a way to do so).

I would appreciate your help!

 

fwiw

"In order to do so I wanted to assign the EA-specific MagicNumber to that trade, I think this won't be possible because one cannot assign a MagicNumber to a trade that has already been opened (or at least I coudn't find a way to do so). "

correct

.

many possibles to get data into EA eg, text file, start up inputs (obviously one shot affair), Client Terminal Global Variables <F3>,your comment field during manual order idea, hot keys, hot key script with input=tic#, runs and sets Gvar with input,dlls, this and that..., is nebulous area with many 'possibilities' ltd only by your imagination.

.

YOU need make decision = play around and do whatever works for you and is simple/idiotProof to execute for 'user'

.

have fun

 

Thank you a lot!

That's exactly what I wanted to know. Client Terminal Global Variables must be what I was looking for.

Reason: