Forum

TrailingStop-values after reconnect or reboot

Hello, I'm currently programming an EA and want to implement a trailing-StopLoss. If an order is open the SL is calculated for the current bar and plotted on the chart. The SL is to be recalculated for the following bars. If the price is exceeded or undershot, the order should be closed. How is this

Custom Indicator max and min of last 50 bars

Hello all, at the moment I'm traying to create an indicator. The indicator should plot every bar the maximum and the minimum of the last 50 bars to the chart-window. Also it should calculate the difference of maximum and minimum. I tried it like this: #property copyright "" //--- indicator settings

Code of iSAR

Hello all, i want to optimize the indicator iSAR . Is it possible to change it. Where can I find the code of this indicator? BR, mtsTrader

Getting maximum and minimum of the last 20 Bars

Hello all, weeks ago I had a C-programming training. Now I will start to learn MQL5. I read some tutorials but I don`t know how I can get the maximum and minimum of bars to copy them into an own array. Concretely I would like to create an array (e.g. double array_maximum[20]) and safe the maxima of