An EA made from other EA's?

 
I really want to find out if i can trade based on whether 4 other ea's are currently in trade. Is there a way to access the order status of multiple ea's and trigger a trade based on that? I was thinking that OrderSelect could access other ea's trade status, but I am not sure. Thank you very much in advance :)
 

You can observe all the orders (past and present) with OrderSelect().

If magic numbers were used then you can see them too by using OrderMagicNumber() after selecting and order.

 
phy:

You can observe all the orders (past and present) with OrderSelect().

If magic numbers were used then you can see them too by using OrderMagicNumber() after selecting and order.

Thanks a lot, I really appreciate that. It seemed like a stretch to think that separate EA files could access the order history of other EA's. Actually though, now that I think about it. I want to access The EA's history in the same way that it's history is displayed in the strategy tester.

1) can you access the trade history from a strategy tester using orderselect or any other way?

if not..

2) I guess I could just make indicators that do what the EA would do, and then use iCustom to access the "trades"

but my big question in regards to number 2 are that I do not know how to make an indicator that can create percentage based stops and limits based on the opening and initiation of the indicator. So, on a different topic...

3) Is it possible to take the time from(ObjectGet) a VLINE and somehow get the close price at that point, and then create the stops/limits based on that? I am really having a hard time figuring out how to access the close price of the starting point of an indicator, and then creating the percentage based stops/limits from that which would trigger the buffer to turn off the indicator.


Sorry for all the questions, but those 3 have really been doozies.


Thanks you so much..:)

 

1. Strategy tester can probably access test trade data.

2. iCustom() queries indicator index buffer values, it does not do anything with trades.

3. You can get the prices ( open, high, low, close ) from any time in the past, example Close[] or iClose()

---

"I am really having a hard time figuring out how to access the close price of the starting point of an indicator, and then creating the percentage based stops/limits from that which would trigger the buffer to turn off the indicator."

"but my big question in regards to number 2 are that I do not know how to make an indicator that can create percentage based stops and limits based on the opening and initiation of the indicator. "

No idea what you are groping for there.

 
phy:

1. Strategy tester can probably access test trade data.

2. iCustom() queries indicator index buffer values, it does not do anything with trades.

3. You can get the prices ( open, high, low, close ) from any time in the past, example Close[] or iClose()

---

"I am really having a hard time figuring out how to access the close price of the starting point of an indicator, and then creating the percentage based stops/limits from that which would trigger the buffer to turn off the indicator."

"but my big question in regards to number 2 are that I do not know how to make an indicator that can create percentage based stops and limits based on the opening and initiation of the indicator. "

No idea what you are groping for there.


Thanks Again, that is a great help. Yes, I figured you cannot use orderselect or any other type of selection function to access an EA's test trade data. iCustom on the other hand, can turn an indicator into an EA if the iCustom is placed in an EA, which I will try to do.

The big problem, I think I almost have a handle on, is that I want to create a histogram that starts based on a condition, and then stops based on a 1% move in price above or below the start of the indicator.

1) How do you get the price of the start of the indicator if the index of the close[] is always changing. I was thinking of using a counter that gave an increasing value to the y coordinate of a VLINE, and then creating those 1% price values based on that.

I guess all I want is a PRICESTAMP. lol. That is not a word but its like a Timestamp, but it just snatches the price at a given point.

Thank you very much. I would love to solve this problem, and thanks for your help.

 

Not sure I'm 100% clear on your objective.... but you can pass any variable to any other EA with global variables.... so define PRICESTAMP in one EA and then pass that value to other EA's with...

https://docs.mql4.com/globals

hth

V

 

You want an old price?

double someOldPrice = High[156]; //the highest price during the 156th bar

 
Viffer:

Not sure I'm 100% clear on your objective.... but you can pass any variable to any other EA with global variables.... so define PRICESTAMP in one EA and then pass that value to other EA's with...

https://docs.mql4.com/globals

hth

V


That's it. That is what I was looking for. Wow, that was a brainteaser. Thank you!!!!!!!!!!