Can a MQL5 EA draw an (uninterrupted, curved) stop loss line?

 

...like a MQL5 indicator could? Or like WHS Nanotrader can? Not just the default (straight) line, but a curve, e.g. that of a parabolic SL.

If yes: how?

If no: what‘s next best solution?

And will they also show in the strategy tester (backtesting) visualization?

Thank you very much!

 

bromelio: ..like a MQL5 indicator could? a curve, e.g. that of a parabolic SL. If yes: how?

And will they also show in the strategy tester (backtesting) visualization?
  1. Not easily. You have to draw line segments. (I've never updated my posted code for Build 600. Dots in variable names made into underscores.)
              What exactly is polyline? - Moving Average, MA - MQL4 and MetaTrader 4 - MQL4 programming forum
    It needs to be made into a class, one instance per line.

  2. If the EA creates the line, of course it shows.
 
whroeder1:
  1. Not easily. You have to draw line segments. (I've never updated my posted code for Build 600. Dots in variable names made into underscores.)
              What exactly is polyline? - Moving Average, MA - MQL4 and MetaTrader 4 - MQL4 programming forum
    It needs to be made into a class, one instance per line.

  2. If the EA creates the line, of course it shows.

Ok, thanks. But your code wouldn't work in MQL5, right?

And an interrupted line like dots or underscores (but without any space between the SL-level and the drawn charaters), how could that be achieved in MQL5?

 
  1. It won't work in MQL4 either.
  2. I answered your question "can it." Yes.
  3. I answered your question "How?" I showed you an implementation.
  4. Rewrite it as a class.
 
whroeder1:
  1. It won't work in MQL4 either.
  2. I answered your question "can it." Yes.
  3. I answered your question "How?" I showed you an implementation.
  4. Rewrite it as a class.

Ok, thank you, I'm new to MQL5 and didn't spot it at first glance, will study it in more detail! :)

 
bromelio:

...like a MQL5 indicator could? Or like WHS Nanotrader can? Not just the default (straight) line, but a curve, e.g. that of a parabolic SL.

If yes: how?

If no: what‘s next best solution?

And will they also show in the strategy tester (backtesting) visualization?

Thank you very much!

yes
Reason: