I was wondering if there is a way to do the following -- (End result should be labels) I want to calculate the % move of each candle for say 12 bars and then 3 labels based on that data Label for All bars (The numbers below is just for example purposes) Between 10% - 5% = 3 out of 12 Between 5% - 2% = 5 out of 12 Less Than 2% = 4 out of 12 The color of the bar or direction doesn't reaby strategynode - Trading Discussion
Hi, I am having trouble figuring out whats the most efficient way to code the following. For example: we have defined 4 conditions now I want to show a signal when 3 out of 4 conditions are true. I was thinking if statements but couldn't figure how the logic will look like because the order of the conditions being true in not linear. Thank You.by strategynode - Trading Discussion
Is there a way to put an arrow on a specific day of the week on a day chart? So for example on a daily chart of 3 months show all fridays? Also how can create a rollover vertical line on a daily chart for the week, so just like the year end rollover line I would like a week end rollover line is this possible?by strategynode - Trading Discussion
Hi Robert, I have question on how to get the value of the peak before the valley if valley is true if valley[5] == 1 then close else double.NaN I want to know is the above is true then what was the peak right before it? Thanks robert Wrote: ------------------------------------------------------- > I wrote this for myself a while ago and was > recently asked in a PM about someby strategynode - Trading Discussion
So I want to know how to find stocks which have dropped 15% or higher from n bars, I figured out how to calculate that from a fixed no. of bars ago but I want the scanner to show all stocks 15% or more down from whenever last it happened. Is that possible?by strategynode - Trading Discussion
Hi, does anybody know if it is possible to calculate the angle between two points so for example angle between HlC3 from 5 bars ago till today? I know ATAN is supposed to calculate angle but I don't think I am using it correctly.by strategynode - Trading Discussion
Perfect thank you so much! Robert. So I tried a different method somebody else suggested was to use the "condition true with n bars" which also did give me what I was looking for, any reason you may think the above mentioned solution may not work? Also I have another followup question on this how do I record the value where that certain condition is true so for example say: Conby strategynode - Trading Discussion
I am trying to figure out if a certain condition is true within n number of bars so right now it looks very long and inefficient wondering if there is a easier way to do this I think fold function might help but I am not very familiar with it and am not able to make it work, here is how it looks right now. (condition[1] or condition[2] or condition[3] or condition[4] or condition[5] or condby strategynode - Trading Discussion
Perfect! that worked thank Robertby strategynode - Trading Discussion
robert Wrote: ------------------------------------------------------- > > Now I have another question... is there a way to > add all the volume from a green candle seperatly > from a red candle? > > > > def UpVolume = if GreenCandle then Volume else > double.nan; > def GreenVolume = SUM(UpVolume, 78); > > def DownVolume = if RedCandle then Voluby strategynode - Trading Discussion
Ok this what I came up with it looks promising to me but not sure yet since I have to use my eyes to analyze it. to get around the aggregation problem of not being able to show it as a study on a daily chart I creates a column in the watchlist and added the code as a label makesure to select 5 min also I have unchecked the extended hour data. def GreenCandle = Close>Open; def RedCandleby strategynode - Trading Discussion
Thanks For the info I am going try this today.by strategynode - Trading Discussion
Thats too bad. so if I did wanted to do the same thing but on a 1 min chart add a label of how many green and how many red bars in a 5 min chart how would I go about doing it do you have a example code which shows how to count thinks in thinkscript? robert Wrote: ------------------------------------------------------- > > Hi I have an idea but have no clue how to even > code it oby strategynode - Trading Discussion
Hi I have an idea but have no clue how to even code it or if it is even possible in thinkscript The premise of this idea is based on the fact the red and green daily candle. A candle turns red when the close is below open and green when close is above open (I am pretty sure everyone knows this). I want to create a arrow in the daily chart which is based on the count of green and red bars in aby strategynode - Trading Discussion
Hi, I have a signal which I like using on the week candle it works great but this is the problem I am facing. Say symbol A gets the signal on Monday, on tuesday symbol B gets the signal but the scan still also shows symbol A with symbol B. I do want to see symbol A so that I can remember but I need to see what symbol got the signal today on the week candle. I think I have a solution but hby strategynode - Trading Discussion
I wanted to share a MACD divergence code which seems to work really well but i am having problems scanning for it and wanted see if anybody could help me decipher it. How I use it? I use this in an intraday 5 min chart and a 3 month day chart. below I am attaching the study and the scan I created (from ) . The problem with the scan is that it shows me the divergence for yesterday today,by strategynode - Trading Discussion
strategynode Wrote: ------------------------------------------------------- > Thanks So much Robert I am going to try this right > now. > > I had a weird problem this morning with the points > the earlier signals were are all arrows up or down > and they worked in pre market can anybody think of > any reason why the POINTS didn't work in > premarket? Robertby strategynode - Trading Discussion
Thanks So much Robert I am going to try this right now. I had a weird problem this morning with the points the earlier signals were are all arrows up or down and they worked in pre market can anybody think of any reason why the POINTS didn't work in premarket?by strategynode - Trading Discussion
I have a new question. I have couple of studies I use, there anyway to create a ONE alert when diffrent studies are meeting the criteria at the same time. I know I can combine studies in one signal but that becomes to selective so say if i am using the MACD Histogram and a buy signal, I want the alert to fire when the MACD bar < one bar ago but also if there is a buy signal exists during tby strategynode - Trading Discussion
Thanks Robert That worked! The only thing with the dots are that as I resize my window somtimes they overlap or sometimes they overlap partialy no matter what. I am using them on a 5min chart. StrategyNodeby strategynode - Trading Discussion
How would I do the second solution? do you have any sample code or a place i could see an example? robert Wrote: ------------------------------------------------------- > > I am using multiple diffrent signals on a 5 min > chart. They all have up or down signal (Arrow) is > there a way to stack the arrows one below the > other if there are multiple signals on one bar? &by strategynode - Trading Discussion
I am using multiple diffrent signals on a 5 min chart. They all have up or down signal (Arrow) is there a way to stack the arrows one below the other if there are multiple signals on one bar? Or is there a solution which you guys use to see all the signals? may be dots? if so can you let me know how ? Thanks, StrategyNodeby strategynode - Trading Discussion
I am sorry to ask for one last thing, I wanted to combine this indicator with the existing indicators. # stochslow def SlowD = StochasticFull(80, 30, 2, 2, hlc3, hlc3, hlc3, 3, "EMA" ).FullD; def SlowDup = SlowD crosses above 30; def SlowDdn = SlowD crosses below 80; # CCI def CCI = CCI(7); def CCIup = CCI crosses above -100; def CCIdn = CCI crosses below 100; # MFI dby strategynode - Trading Discussion
Hi Robert, I was wondering if there is any way to add the following indicator into this buy and sell signal code already in this thread: Existing Code: # stochslow def SlowD = StochasticFull(80, 30, 2, 2, hlc3, hlc3, hlc3, 3, "EMA" ).FullD; def SlowDup = SlowD crosses above 30; def SlowDdn = SlowD crosses below 80; # CCI def CCI = CCI(7); def CCIup = CCI crosses aboby strategynode - Trading Discussion
optiontrader101 Wrote: ------------------------------------------------------- > Hey Optiontrader101, Wondering if you be willing to share how you get the buy and sell signal? It looks pretty awsome. Thanks, StrategyNodeby strategynode - Trading Discussion
Thats what I thought. Thanks Robert!by strategynode - Trading Discussion
Robert Thanks for pointing me in the direction of darcy's post that was very helpful. Also the study I was refering to was the ADX study in page 4 or 5 i belive but There two versions of the post and the second one is the correct one. I have a new question for you or any body who has a answer to this: Is there any way to create a new alert for a watch list (static) ? or a custom coluby strategynode - Trading Discussion
I dont know what I am doing wrong but I am using this as a study on a 1 min chart but seems to give both buy and sell signal on the same bar. I dont know if some has faced this or knows why? Also I think there are some post which are missing I see that there is a scan available for the "E UP" but I dont see any explanation what and how it works? may be its in another thread can soby strategynode - Trading Discussion
Thanks. You are awsome!by strategynode - Trading Discussion
Hi Robert, This looks great, do you still use it? do you use it intraday or on daily ? also is there anyway to turn it to a scan ? do you use it for scans? There is a new code in your last message for calculating the open signal do we need to replace that in the above code? Thanks, StrategyNodeby strategynode - Trading Discussion