Hi,
Quote:
1: Use EMA to check for trend (Havent figured out how to check the slope of the EMA, so at this stage the strategy only checks if the candle max is below EMA for long, or if candle min is above for short).
For this you need to use 2 EMAs blocks with one shifted and the other retrieving the current value (0). You'll be able to compare the outputs of each EMA and then determine the trend.
Quote:
2: check different charts to see if the candle corresponds with trend in 1 (green candle for long, red for short).
You're already doing it right but some adjustments are needed.
Quote:
The strategy is opening just fine. The problem comes with the trade exit. It need to check the candle after the candle in which the trade is made (and subsequent candles), and only when that candle is closed (so if say a long trade is in profit, and a red candle is made, the program closes the trade, if a green candle is made, the trade stays open until a red candle is made).
I'll provide you with a version that performs that asap.
Overall, your strategy is using multi-time frames and you need to bear in mind that a serial connection could block the flow. Also, the first check of open positions is blocking the strategy when a position is created so you need to move this filter down so that the closing conditions can be executed otherwise it wont.
Speak soon ...