Hi. Does anybody know how to code a stop out after x minutes if not in profit by then?
There you go:
IF OnMarket AND (BarIndex - TradeIndex) >= 10 AND PositionPerf <= 0 THEN //exit any trade, be it Long or Short, after 10 bars if not profitable by then
SELL AT MARKET
EXITSHORT AT MARKET
ENDIF
startrader – Welcome to the forums. Your topic is strategy related so you should have posted in the ProOrder forum which is for strategy topics rather than in the General Discussion forum.
I have moved your topic. Please try to post in the correct forum with future topics. 🙂