Does anyone know how to write a script that will give the volume between 12 and 1 o'clock on a particular stock? # Time # def TimeF = (SecondsFromTime(“fromTime" = 1200) >= 0); def TimeH = (SecondsFromTime(“fromTime" = 1300) >= 0); # Volume # def Vol = volume("period" = AggregationPeriod.DAY); Plot VolumeX = vol(TimeH - TimeF); Thanks, Ralph.by Ralph53 - Trading Discussion
Does anyone have a script that will calculate Pre Market movement starting at 4:AM and using 4AM as the open price? I use this but I'm not sure it works right; # % Pre Market Movement # Plot PreMarketMovement = ((Highest(High)/open) - (Lowest(low)/open))*100; Thank you.by Ralph53 - Trading Discussion
Xby Ralph53 - Trading Discussion
Not working yet. Anyone know how to write this; rec ConditionValue = X - PreviousX; There has to be a way to designate the previous occurrence in a sequence of random multiple occurrences. Thanks, JM.by Ralph53 - Trading Discussion
Thank you so much I'll test this.by Ralph53 - Trading Discussion
That's a good explanation. If X triggers at 10:00 and again at 10:10 what I'm looking to do is calculate storelow(10:00) - storelow(10:10). Do you know a way to save the value of the previous(10:00) condition? Thanks again, JM.by Ralph53 - Trading Discussion
Does anyone know how to alter this script? def storeLow = if X then open else storeLow[1]; Each time X occurs storeLow remembers the new value and the previous value is lost. Does anyone know how to write this so I can get storeLow to hold the value of the previous occurrence of X (that may have occurred 10 candles back) instead of the present value of X overriding the previous? (else prevby Ralph53 - Trading Discussion
Thanks, Robert. Do you know a way to get this similar script to work? def X = SimpleMovingAvg("goog" - SimpleMovingAvg("goog"[1]; (Where's your tip jar these days?)by Ralph53 - Trading Discussion
I need just the 'open' part of this script to use the daily Aggregation (close AGG = MIN); def X = Round(close(“GOOG" - open(“GOOG”)[1]); I can’t figure out how to add a day Aggregation script to it so TOS will accept it; ("period" = AggregationPeriod.DAY) Does anyone know how to do this? Thanks.by Ralph53 - Trading Discussion
Does anyone know if there's a way to write this script so it will give the lowest close for the day (instead of the lowest low)? Low("period" = AggregationPeriod.DAY) If not is there another script that will show the lowest close for the day during market hours? Thanks,by Ralph53 - Trading Discussion
Does anyone know of a way to make this script hold the green color for the entire trading day after X goes above 1.00? Thanks. Plot X = close - (Open("period" = AggregationPeriod.DAY)); X.AssignValueColor (if X >= +1.00 then Color.Green else Color.Black);by Ralph53 - Trading Discussion
I have a simple script for a stock's spread that TOS sent me a while back. It produces several white zero's when I use it in a watch list. Does anyone have a better spread script that works in a watch list column without the white zero's? Thanks, JM. def Bid = if isnan(close(priceType = PriceType.BID)) then Bid[1] else close(priceType = PriceType.BID); def Ask = if isnan(close(priceType =by Ralph53 - Trading Discussion
Thanks for your time devildriver6. Sorry about my confusion about how Conditions work.This may make more sense; def Condition1 = Close <= Open; def Condition2 = Close < Open; Plot X = if Condition1 then [ the distance in cents between the close of Condition1 continuing until Condition2 is reached ] What I'm trying to do is have the script keep counting the distance from the poby Ralph53 - Trading Discussion
Mr. Bond; 'X' Volume might not be what you want because each stock will react differently to 'X' (whatever you pick). Try this Add Label on a chart it uses TOS's Volume Average on a 1 minute candle. It's simple but useful and gives you the 1 minute percentage above or below the average; # Add Label Volume/Volume Average # input length = 50; def Vol = volume; def VA = Average(volume, lengtby Ralph53 - Trading Discussion
It's 1 Minute devildriver6. What I'm trying to do is calculate the distance in cents from any point on a chart. Not just from crossover points. This will be a very useful script to have if it can be done because it will tell the size of any up thrust from anywhere in its cycle.by Ralph53 - Trading Discussion
Thanks for your time devildriver6. Some more tinkering and I've come up with something that works and is very close to what I'm looking for; def Condition = Close <= Open; Plot ConditionConfirmed = if Condition then Close - Highest(Open, 4) else double.nan; I don't want to use Highest(Open, 4). What I'm trying to do is have the script keep counting the distance from the point of 'by Ralph53 - Trading Discussion
I gave you the wrong script last night but I think a Recursive Variable is not what I need (and doesn't work in my situation). How can I get the the Open Price value of the candle when plot X hits; Plot X = Close >= Open; Thanks, JM.by Ralph53 - Trading Discussion
I was messing with this simple Recursive Variable script idea; rec Up = close >= Highest(Open,6); plot X = Up; In a watch list column it only gives a yes or no indication. Is there any way to get a Recursive Variable to plot the actual price when the last (close >= Highest(Open,6)) occurred or does it only work that way with crossovers of actual studies like MACD or Stochastics?by Ralph53 - Trading Discussion
That was quick. I had an idea I've been working on. The way the previous script is the price is on the line at the bottom of the chart ( $53.21 ). I wanted to use the price value at the crossover ( $53.21 ) in another script. I'm actually trying to plot the point when the stock goes .50 cents above (or below) the crossover price. This way I'll know if the crossover has movement behind it. The ideby Ralph53 - Trading Discussion
Thanks devildriver6 it looks great. I tinkered with it and came up with this; # Stochastic Crossover Line On Chart # def SlowK = StochasticSlow("k period" = 9, "d period" = 9)."SlowK"; def SlowD = StochasticSlow("k period" = 9, "d period" = 9)."SlowD"; def Bearish = SlowD crosses above SlowK; def Bullish = SlowK crosses above Sby Ralph53 - Trading Discussion
Does anyone know how to alter a script to show the price the stock is at when a Stochastic crossover occurs? StochasticSlow("k period" = 9, "d period" = 9)."SlowK" crosses above StochasticSlow("k period" = 9, "d period" = 9)."SlowD" Thanks, JM.by Ralph53 - Trading Discussion
In a watch list script that returns 1.0's and 0.0's in the column, is there anyway to write it so that the 1's will show the letter ‘F’ (in yellow) instead? Thank you, JM. plot X = close[2] <= open[2]; X.AssignValueColor (if X then color.Yellow else color.Black);by Ralph53 - Trading Discussion
Does anyone know how to script a stock's current spread? Thanks.by Ralph53 - Trading Discussion
Unfortunately we can't always get what we want from one company. I did the Bid and Ask (and Spread) using E*TRADE. They let you have all kinds of floaters outside the main window that take up very little space. You can get the Bid and Ask from their watch list, minimize it and put it anywhere you want. The downside is it's $100 a month end it's not linkable with TOS that will cause distractions iby Ralph53 - Trading Discussion
I need . This works for the first 2 candles; def X = close - Max((High), Max((Open[1]), (close[1]))); I tried this but it doesn't work for 3; def X = close - Max((High), Max((Open[1]), (close[1])), Max((Open[2]), (close[2]))); Can anyone help make this work for 3 candles? Thanks.by Ralph53 - Trading Discussion