StockFetcher Forums · General Discussion · Count of value in between two user values << >>Post Follow-up
 push5280197 postsmsg #160815- Ignore push5280modified 1/30/2024 8:44:29 PMNeed some help from the group. I'm thinking this is giving me an error because I'm using two user defined values or is it because "count" and "in between" hate each other? Fetcher[ set{6molo_30pct, close 6 month low * 1.3} set{6mohi_70pct, close 6 month high * .7} set{stage1, count(ema(5) < 6molo_30pct,1)} set{stage2c, count(ema(5) is between 6molo_30pct and 6mohi_70pct ,1)} set{stage2, stage2c * 2} draw stage1 draw stage2 ] redversa721157 postsmsg #160817- Ignore redversa721 1/31/2024 2:35:32 AMCan you break down the in between step into 2 pieces stagec1 is count (ema> 6molo,1) stagec2 is count(ema< 6mohi,1) not sure if this would work but thought i'll just ket you know xarlor565 postsmsg #160819- Ignore xarlor 1/31/2024 9:47:03 AM Fetcher[ set{6molo_30pct, close 6 month low * 1.3} set{6mohi_70pct, close 6 month high * .7} set{stage1, count(ema(5) < 6molo_30pct,1)} set{stage2a,count(ema(5) > 6molo_30pct,1)} set{stage2b,count(ema(5) < 6mohi_70pct,1)} set{stage2c,stage2a * stage2b} set{stage2, stage2c * 2} draw stage1 draw stage2 ] nibor1001,014 postsmsg #160825- Ignore nibor100 2/1/2024 2:24:46 AMYou can use count and "is between" together in a statement if SF, however it is my understanding that SF will only apply "is between" to actual numbers, not defined variables. For example this statement should work: add column count(ema(5) is between 10 and 20,1) hope this helps, Ed S. push5280197 postsmsg #160832- Ignore push5280 2/1/2024 12:35:09 PMThanks Ed! I thought that using user defined variables was what was causing the issue but I couldn't find any documentation on limitations. I appreciate your help.
 StockFetcher Forums · General Discussion · Count of value in between two user values << >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.