Forum

Can't modify trailing stoploss

I want to to create a trailing stoploss and draw a dot on the chart to track the changes. The dot tracker works but it moves in both directions I only want it to move up with a buy position and down with a sell position. Also the stoploss itself doesn't modify. I'm sure there's a simple solution but

Intererferance with multiple instances of MT5 - different stoplosses on the same EA

I have an EA that enters a stoploss based on the low of the last '5' bars. This is updated each bar to make a trailing stop. There is also a dot drawn once a bar to track the updated stoploss. This has been working fine and I have backtested it multiple times. I have recently purchased a third party

Creating indicator array, to use for EA

Hi I am trying to use the MACD divergence indicator as a signal for my EA. In order to do this, I have tried to add another array into the indicator that stays at 0 and signals 1 when a divergence condition is met. I wanted to plot this array intially to see if it worked before using it in the EA. I

Increment varibles while condition is met

I am trying to count the number of bars while a condition is met. In the chart below I want to count the number of red bars (when aray is < 0). I want to make an EA but first I am trying to visulise it to ensure its working correctly. I have tried to plot it in an indicator which has added another

EA only enters one trade in backtesting and can't update only once per bar

Hi, I'm a complete beginner so apologies in advance. I have created an EA based on a consolidation breakout indicator. Once the conditions are met it sends two pending orders at the high and low of the consolidation. Once one order is entered the other should be cancelled and a trailing stop tracks