• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Price Exit Strategies

Dannosuke

New member
Hi Everyone,

Does any one know how to create an exit trigger that is based on price movement? I want it to exit on the second higher bar after trigging or after breaking the low of the bar that was triggered. This is for trading Options

Here is what I have so far the exit is based on crossing the upper bollinger band but it doesn't seem to be a good indicator to exit on.


Code:
###

input tradeSize = 10;

def signal = RSI()."RSI" crosses above 25 and low crosses below BollingerBands()."LowerBand" within 8 bars;

addOrder(OrderType.BUY_TO_OPEN, signal, open[-1], tradeSize, Color.CYAN, Color.CYAN);

def exit = RSI()."RSI" is less than RSI()."RSI" from 1 bars ago and high crosses above BollingerBands()."upperband" within 4 bars;

addOrder(OrderType.SELL_TO_CLOSE, exit, open[-1], tradeSize, Color.MAGENTA, Color.MAGENTA);

###


Thanks for any help

DannosukePhD
 
Last edited:

Similar threads

Top