hello hit626387, This is how I would do it, but there is probably a cleaner way. Hope it helps you. AddLabel(yes, Concat("Rsi = ", Round(RSI, 2)), if rsi >= 85 then Color.RED else if rsi <= 15 then color.GREEN else color.GRAY);by Jdubpwr - Trading Discussion
I understand. No problem and I wish you well. I'll be stepping away from the computer for the morning, but have a great day and it was nice chatting with you.by Jdubpwr - Trading Discussion
I checked it and it is correct. The filter is the draw back of a mechanical filter vs. your discretion. You could insert something like a stochastic cross and the candle close above/below the HMA within N bars these are about the only choices. Here is am image with some notes of me checking it on crude futures a few minutes ago. Visit Imageby Jdubpwr - Trading Discussion
The longer the period of the HMA (and depending on what Stoch settings you use) the more prone it will be giving down arrows when price is above the HMA even if HMA is red, for example. If you want to avoid those signals (assuming those are the bad signals to which you refer) then look towards the bottom and change the following lines of script. #plot Crup = if ASMA and FullD crosses aboby Jdubpwr - Trading Discussion
No problem. I set the HMA to 250, and changed the Stoch crosses. It will only plot a down arrow when HMA is red, and up arrow when HMA is green. Please consider, however, that multiple candles can close in the opposite direction of the HMA color before it changes which may give the appearance arrow are forming where they should not. The code relies on the HMA color, not the candle close above/belby Jdubpwr - Trading Discussion
When you say "the arrows should only appear when stoch is oversold (20) while HMA up/ green. And arrow down/ signal when stoch overbought (80) and HMA red" Do you mean K, D, or K&D is oversold/overbought? When you say "when the stoch goes oversold 20 ... ." Do you mean Stoch crosses below 20 (still going down), less than 20 (fire an arrow anytime it is lessby Jdubpwr - Trading Discussion
Sounds good, glad it works and that you were able to make the corrections. Have a great morning.by Jdubpwr - Trading Discussion
I am not the best scripter, but I am the best in this thread tonight. I don't have site permission to upload an image but it plots what you requested. declare upper; input over_bought = 80; input over_sold = 20; input KPeriod = 5; input DPeriod = 3; input slowing_period = 3; input smoothingType = AverageType.SIMPLE; input priceH = high; input priceL = low; input priceC = close;by Jdubpwr - Trading Discussion
normally you script it alert(Crup[1], "Arrow Up", Alert.Bar, Sound.Ding); The Crup[1] is one bar back having close so that you don't get constant dings as the candle is forming, however, based on your question I have scripted yours to occur when while its forming and you can always change it to delay. You will see I coded it alert(Crup, "Arrow Up", Alert.Bar, Sound.Ding);by Jdubpwr - Trading Discussion
No problem. Yes, all the settings can be changed. Your request was about as easy as joining to default indicators so glad to help, though I normally cannot. I post something for you in 20min.by Jdubpwr - Trading Discussion
MXO1. What HMA length, and stochastic settings are you using? For example, Hma = 20, and stoch settings are 5,3,3. I created the script for you but no signals plot on a daily chart unless you are using large setting numbers and I want to make sure it is what you asked for. Also, the HMA pointing up/green or down/red is formulated hma>hma[1] by default meaning the slope of moving average beingby Jdubpwr - Trading Discussion
MX01, It looks like WilliamsFractal which has at least a 2bar look back delay for the signal to appear. It is available in virtually all charting packages. The only holy grail is you.by Jdubpwr - Trading Discussion
Hello danceswithclouds, It is my limited understanding that TOS has the strategy tracking hard coded preventing access to the data. Some features can be accessed but are limited in use, such as entryprice() and FPL() . entryprice() interaction generally only knows if a position is active so once the position is closed it resets, unlike FPL() which keeps a running log, though in P&L not traby Jdubpwr - Trading Discussion
Hello everyone, long time lurker first post. I have a simple question that I cannot seem to answer and would appreciate any help. I know how to script consecutive days closing lower such as --- def LC = sum(close<close[1], 3) ==3; --- but seem to be missing how to script 3 days closing lower "out of" 6 such as -- N out of X days. Edit: ... victory! I figured it outby Jdubpwr - Trading Discussion