Tâche terminée
Spécifications
Hi I'm looking for a price action EA placing automatic trades based off horizontal lines. It will have variable inputs for the trade size, stop loss/risk ratio and trade direction.
Pseudo Code
Entry
Requirement 1
Price (candle 1) crosses horizontal line via 3 pips (direction of trade is variable)
Following candle (candle 2) closes equal to/above/below the previous candle AND in the upper/lower third of the candle depending on variable direction selected
If above condition is met then move to requirement 2
If not candle 3 needs to close above/below candle 2 and in the upper/lower third of the candle
If not candle 4 needs to close above/below candle 3 and in the upper/lower third of the candle
If not candle 5 needs to close above/below candle 4 and in the upper/lower third of the candle
If not candle 6 needs to close above/below candle 5 and in the upper/lower third of the candle
Void entry
If candle 2 and 3 opens and closes above/below the horizontal line drawn
If entry conditions are not met by candle 6
Requirement 2
Place stop 5 pips below/above the high/low of candle 1-6
Maximum stop loss = variable including 5 pip candle 1
Requirement 3
If requirement 1 and requirement 2 are met place a market order
If requirement 1 is met but not requirement 2 then place a limit order (to meet requirement 2 stop loss settings)
If limit order is not activated within candle 3 to 6 void trade
Trade Management
Lot size calculator via percentage i.e. risk 2% per trade
Risk/Reward variable 2:1 3:1