Programming Help - Avoid opening the trade in the same price as already opened trades

 

Hi guys,

 

I am programing an EA and I want to avoid opening the trade in the same price as already opened trades if the market keeps moving up and down, could any advance programmer please help me with this problem? J)) …

 

I was thinking to do it via array, but I am not good in arrays and I need a help with following:

 

I need the code and help how to program two dimensional array, where the first dimension is the order open price of all open trades and the second is the order type (buy or sell) of each open trade.

 

Or anyone has other ideas how to avoid opening the trades at the same price?

 

Thank you for your help!

 
  1. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. You're on the right track, you need to know the highest/lowest price of all your trades. No arrays needed, just an OrderSelect loop and find it.
Reason: