StockFetcher Forums · Filter Exchange · Here is code to place a version of Heikin Ashi on your chart.<< >>Post Follow-up
SAFeTRADE
644 posts
msg #149495
Ignore SAFeTRADE
10/31/2019 8:37:02 AM

Fetcher[
set{cls,close}
set{m8,ema(8)}

/* ******** Code starts here********* */

set{op1, open 1 day ago + close 1 day ago}
set{op, op1 / 2}

set{hi1, max(high,close)}
set{hi, max(hi1,open)}

set{lo1, min(open,low)}
set{lo, min(lo1,close)}

set{z1, max(lo,op)}
set{ha, max(z1,cls)}

/* ******** Code ends here********* */

set{lri60, lri(60)}
set{lri20, lri(20)}

close > 5
close < 100
average volume(30) > 750000
optionable

draw lri(20)
draw lri(60)

draw m8 on plot ha



add column RSquared(close, 60)
sort column 5 descending
]




Cheese
1,374 posts
msg #149497
Ignore Cheese
10/31/2019 10:19:45 AM

Now, that's clever. Thank you, SAFe.
Would you be able to simulate renko? (not draw renko bricks, just indicate the signals)

xarlor
581 posts
msg #149502
Ignore xarlor
10/31/2019 1:48:45 PM

I see what you're doing.

In your code, me thinks you have hi incorrect. Right now you're asking SF for the max between high, close, and open, which is always going to =high regardless. Likewise with lo, you're asking for the min of open, low, and close which will always =low.

You forgot the cls component too (open+high+low+close)/4. I think you meant:

Fetcher[
set{cls1,open + high}
set{cls2,cls1 + low}
set{cls3,cls2 + close}
set{cls,cls3 / 4}

set{op1, open 1 day ago + close 1 day ago}
set{op, op1 / 2}

set{hi1,max(high,op)}
set{hi,max(hi1,cls)}

set{lo1,min(low,op)}
set{lo,min(lo1,cls)}

add column cls
add column op
add column hi
add column lo
]



SAFeTRADE
644 posts
msg #149504
Ignore SAFeTRADE
10/31/2019 4:27:15 PM

Yes, I had to use the poor man's version, I kinda like how what came up with plots.
Here is the full code:

set{op1, open 1 day ago + close 1 day ago}
set{op, op1 / 2}

set{hi1, max(high,op)}
set{hi, max(hi1,Day Position(0.50,1))}

set{lo1, min(open,op)}
set{lo, min(lo1,Day Position(0.50,1))}

set{z1, max(lo,op)}
set{ha, max(z1,Day Position(0.50,1))}

the last max is too much for the cheap version. Until I can figure a way around that
I will go with poor man's version..

If someone upgraded to the advanced version run the full code and see what
it looks like please.

Safetrade

xarlor
581 posts
msg #149505
Ignore xarlor
10/31/2019 5:51:40 PM

This definitely will require Advanced sub, but I made a histogram out of green/red Heikin Ashi candles. A count of 2 is green candle and a count of 1 is red candle. It makes it easier at a glance to see if the trend is bullish, negative, or choppy.

Fetcher[
set{cls1,open + high}
set{cls2,cls1 + low}
set{cls3,cls2 + close}
set{cls,cls3 / 4}

set{op1, open 1 day ago + close 1 day ago}
set{op, op1 / 2}

set{hi1,max(high,op)}
set{hi,max(hi1,cls)}

set{lo1,min(low,op)}
set{lo,min(lo1,cls)}



draw hi
draw lo on plot hi

set{trend,count(cls > op,1) + 1}
draw trend

do not draw cls
do not draw op

set{lri60, lri(60)}
set{lri20, lri(20)}

close > 5
close < 100
average volume(30) > 750000
optionable

draw lri(20)
draw lri(60)

add column RSquared(close, 60)
sort column 5 descending
]



SAFeTRADE
644 posts
msg #149506
Ignore SAFeTRADE
10/31/2019 8:24:46 PM

Good idea, thanks for contributing,

Safe

StockFetcher Forums · Filter Exchange · Here is code to place a version of Heikin Ashi on your chart.<< >>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.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.