Matthew Greenslet![]() Idol ![]() ![]() ![]() ![]() Posts: 2077 Joined: 2/27/2006 ![]() | If you want to exit when the last price has violated the prior bars 3 period lowest low value you can use C < LLV(3)[1]. This will look back 3 bars so depending on what your timeframe is set to will determine how much data is used to calculate the lowest low. If you wanted to calculate the prior 3 daily lows on a lower periodicity timeframe then you will need to dynamically change the number of bars used in the LLV(offset) call. Since exits only start calculating after a signal has been fired it might be easier to return the desired exit level from an Indicator. This way you will not have to dynamically calculate LLV(offset)[Lookback] where lookback is equal to the number of bars in the current session + 1. We might have a function that returns the number of bars in the current session but I can not check on that at this time (running some other tests) in which case it can all be done within a stop instead of an Indicator + Stop. If you are on a intra-day chart you need to calculate how many X minute bars (X=SymbolData.Compression) make up 1 whole trading day. This will depend on the exchange you are trading. If you are on a daily chart you would simply use C < LLV(3)[1] For an example of how to tell what periodicity you are on (minute, Daily, Weekly) take a look at the floor pivot indicator under the OT09 Base Indicator sticky thread. |