Programming HELP required

 

I have an EA which works, but in reverse. If I swap the BUY and SELL trade entries round, it doesn't change anything.

What is needed is at the bottom of the chart, it will enter a BUY, and at the top a SELL.

The trades are close by Trailing Stop Losses.

In the attached screenshot, the blue arrows are the BUYS, and the red arrows are the SELLS.

 

This is an MQL4 EA.

 
grahambl: I have an EA which works, but in reverse. If I swap the BUY and SELL trade entries round, it doesn't change anything.
  1. Not just the order type and entry price but also the TP/SL code.

    “Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
         How To Ask Questions The Smart Way. 2004
              When asking about code

    Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.

    Always post all relevant code.
         How To Ask Questions The Smart Way. 2004
              Be precise and informative about your problem

    We can't see your broken code.

    Fix your broken code.

  2. If always buying is a loosing strategy, is always selling a winning one?

 
William Roeder:
  1. Not just the order type and entry price but also the TP/SL code.

    “Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
         How To Ask Questions The Smart Way. 2004
              When asking about code

    Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.

    Always post all relevant code.
         How To Ask Questions The Smart Way. 2004
              Be precise and informative about your problem

    We can't see your broken code.

    Fix your broken code.

  2. If always buying is a loosing strategy, is always selling a winning one?

As a retired computer programmer with over 40 years experience, I think I know what I am talking about. My strategy is unique, and never used before. This is pioneering work only to be attempted by very experienced programmers. If I ask a question, it is a gap in my knowledge, which I hope someone will be able to fill.

Reason: