Can an EA do this?

 

If I draw a trendline can an EA find it and take a buy trade at a candleclose over it if the trendline are green or a sell if it´s red.

And in the tester can I draw trendlines and the EA find and trade as above.

 
Bjorn1:

If I draw a trendline can an EA find it and take a buy trade at a candleclose over it if the trendline are green or a sell if it´s red.

And in the tester can I draw trendlines and the EA find and trade as above.

  1. Yes, but how are you indicating your SL
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    • Do NOT use TickValue by itself - DeltaPerLot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out
  2. Pause visual mode.