dugafish
New member
I am trying to program an indicator in Thinkscript that will look back for most recent two important subsequent and ascending lows to obtain their corresponding price levels . The price of the lower of the two is subtracted from the price of the higher of the two and difference is then added to the higher of two. This level is then plotted as horizontal resistance line moving forward until the next setup replaces it. This resistance line is called LLH. A similar calculation can be obtained to calculate a support line by identifying most recent two important subsequent and descending highs and calculating the difference in price between the two highs and subtracting this amount from the lower of the two highs and potting this level as a resistance line moving forward until a next setup replaces it. The concept of importance for either the highs or lows can really be just a function of a definable lookback period (X bars back for example) of time or if there are obvious highs and lows on the charts that would make common sense to use.