ea that open position when new high or low is made

 
how do I write an ea that enters a trade when previous high or low has been taken out by new ones when i actiavte it with a button, please any ida, i am new to mql4 programming.
 
Femi Kikas: i am new to mql4 programming.
  1. You are new to programming, and you want buttons. Good luck with that, you are way over your head.
    1. Create a button, monitor it using OnChartEvent.
    2. Get and remember the previous high when button is first pressed.
    3. Wait for the market to exceed the high by monitoring OnTick.
    4. Open an order if there isn't any currently open ones.

  2. I suggest you search for a GUI/Trade Assistant EA like mine (for MT4) and just place a pending buy at the previous high.
              'Money Manager Graphic Tool' indicator by 'takycard' - Risk Management - Articles, Library comments - MQL5 programming forum - Page 6 #55
Reason: