Dear Forum Members, Dear Nicolas, a lot of institutional banking firms work with “rule bases investments”. the most popular in our bank is the 200sma/38sma rule based strategy with a 3 % filter for noise. i wanna have this code for my own to use ist in pro realtime. i wanna code this in weekly form, because i check the markets on weekends. description: if the 8 week sma is over the upper band it is a long signal until the the 8 week sma is under the lower band a new long signal is formed when the 8 week sma is over the upper band again. my problem: i cannot code the description until …. please can you do this for me – in my indicator not i have no very time a histogramm and the value is 0. that´s false – the logic is green or red and not 0. do you understand what i mean. please recode my code – that its correct 🙂 thank you so much 🙂 here is my code: // orginial 200 day sma c1 = average[40](close) // the 3 % up band c2 = c1*1.03 // the 3 % low band c3 = c1*0.97 // the original 38 day sma c4 = average[8](close) //histogramm building // result1 is green // result2 is red if c4 > c2 then result1 = 1 else result1 = 0 endif if c4 < c3 then result2 = 1 else result = 0 endif return result1, result2, 0