Can you have multiple Manual Assist EA's on the same pair?

 
Does anyone know of a method to utilize more than one Manual Assist EA on the same pair? I would like to be able to enter manual trades on the 30 minute and the 5 minute but apply a different manual assist to each.
Both would have a magicnumber == 0 so is it possible to distinquish the trades with some other method such as a specific comment in the comment field of the manual trade?
 
you can open two charts on a same pair and run EA on each chart.
I don't know why magicnumber has to be 0, but if you don't close partial orders you can use comment to tell them apart.
Partial close generates a new order and comment is wiped out.
 
irusoh1 wrote:
you can open two charts on a same pair and run EA on each chart.
I don't know why magicnumber has to be 0, but if you don't close partial orders you can use comment to tell them apart.
Partial close generates a new order and comment is wiped out.
Thanks for the reply

i am still having a problem with the EAs picking up the wrong order.

if I open a manual order on the 5 minute and also on the 30 minute both have a magicnumber==0.
And then if i have two different EA's running on each chart that are used to pick up a manual trade where magicnumber==0, how can you tell which order is on the 5 minute so that the exit logic of the 30 minute manual assist EA does not pick up the 5 minute trade or vice versa where both orders have magicnumber==0?
Is there a way to assign a magicnumber to a manual trade?.
Can you select orders by period()?
 
instead of openeing order manually you can write a script to open each order and assign separate magic number to each one. then your ea can pick it up. copy one of scripts from codebase.
 
irusoh1 wrote:
instead of openeing order manually you can write a script to open each order and assign separate magic number to each one. then your ea can pick it up. copy one of scripts from codebase.
Thanks again I will try it!

Along a similar idea do you know how to convert a trade in the 5 minute and its MagicNumber to a trade in a higher time frame such as 1 hour or daily.

What I am trying to do is scale out of a short term trade to a break even or slight profit to set up a free trade in higher time frame. An example would be a news trade in the 5 minute that ends up being with the trend in the 1 hour. The EA would take off 1/3 of contracts at an defined amount of pips profit to move trade to breakeven and then after moving another defined amount of pips take off 1/2 of the remaining contracts for profit in the 5 minute. If the 5 minute trade triggers the final scale out and conversion to a higher timeframe then the remaining contracts (1/3 of the original trade)would then be converted to a trade in the 1 hour provided the trade is with the trend in the 1hour. The stop-loss would be set equal to the profit recieved in the 5 minute.

We now have a "free trade" running in the 1 hour. Over time the EA could then accumulate many free trades that are with the trend of the 1 hour and subject to the exit rules of the 1 hour EA.
But to do this the EA needs to convert the MagicNumber of the 5 minute order to the MagicNumber of the 1 hour when the partial close occurs in the 5 minute. I realize I could just start the news trade in the one hour but since not all news trades are with the trend or yield enough pips, I need the ability to utilize exits rules in the 5 minute and only convert the trades that are with the trend of the 1 hour and yield enough pips to merit conversion to a 1 hour free trade.

Do you know if you can assign a new MagicNumber to an existing order at the time it is partially closed?
 
magicnumber stays with the order forever and you can't change it.

it's possible to keep track of this scheme but it's not straightforward.
I guess it would be a nice feature to have a tag associated with an order that can be changed at will.
It is easy to run a number of expert advisors as one.
After creating each adsvisor rename their Init(),Start and DeInit() to something like InitExp1(),InitExp2(), etc.
So you combined expert init will look like this
int Init()
{
InitExp1();
InitExp2();

...
}

int Start()
{
StartExp1();
StartExp2();
...
}
you can assing a unique magicnumber to each order much like order number.
Then you will need to create 3 queues (using arrays).
When order first created its magic number is recorded on a first queue.
When order qualifies for next level it is being moved to the next queue.
Each expert will deal only with its own queue.
You will need to save these queus to files on DeInit and restore them back to arrays on Init()
plus being text files they are easy to edit manually in the off time if needed.

Or perhaps another technique can be used:
When order is partially closed basically what happens partial order goes to history and new order is created with the same magic number.
for open order you can examine history. If history has no orders with same magic number it original full order.
If one order exists in history its a second level order, if 2 in history then it must be a final 1H order. This way there is no need for queues and files.

It sounds a little convoluted but that's the way it is when you trying to do something a little more complex
or closer to a real world. Believe me as soon as they let you change magic number you will come with another brilliant idea that is hard to implement. So as long as it's not impossible it's fine.
 
irusoh1 wrote:
magicnumber stays with the order forever and you can't change it.

it's possible to keep track of this scheme but it's not straightforward.
I guess it would be a nice feature to have a tag associated with an order that can be changed at will.
It is easy to run a number of expert advisors as one.
After creating each adsvisor rename their Init(),Start and DeInit() to something like InitExp1(),InitExp2(), etc.
So you combined expert init will look like this
int Init()
{
InitExp1();
InitExp2();

...
}

int Start()
{
StartExp1();
StartExp2();
...
}
you can assing a unique magicnumber to each order much like order number.
Then you will need to create 3 queues (using arrays).
When order first created its magic number is recorded on a first queue.
When order qualifies for next level it is being moved to the next queue.
Each expert will deal only with its own queue.
You will need to save these queus to files on DeInit and restore them back to arrays on Init()
plus being text files they are easy to edit manually in the off time if needed.

Or perhaps another technique can be used:
When order is partially closed basically what happens partial order goes to history and new order is created with the same magic number.
for open order you can examine history. If history has no orders with same magic number it original full order.
If one order exists in history its a second level order, if 2 in history then it must be a final 1H order. This way there is no need for queues and files.

It sounds a little convoluted but that's the way it is when you trying to do something a little more complex
or closer to a real world. Believe me as soon as they let you change magic number you will come with another brilliant idea that is hard to implement. So as long as it's not impossible it's fine.
 

Thanks for the concept!

I am going to start on the coding and testing. Hopefully, if I get stuck I can ask you some questions.

Also, I coded in the magicnumber to the scripts and it has worked very well and now my

EA picks up these manual trades and manages each based on the magicnumber.

If I can be of any help to you let me know.

Reason: