TradingView
yourmattie
29 דצמ׳ 2020 17:12

Open Close Cross Strategy R6.1 revised by yourmattie 

Algorand / TetherUS PERPETUAL CONTRACTBinance

תיאור

[b ]Original version: Open Close Cross Strategy R5 revised by JustUncle.


Change: script changed to a study script with custom alerts.

This revision is an open Public release, with just some minor changes. It is a revision of the Strategy "Open Close Cross Strategy R2" originally published by @JayRogers.
Revised by JustUncleL


Description:
Strategy based around Open-Close Moving Average Crossovers optionally from a higher time frame.

Read more about the indicator original script
Klik here

##USE AT YOUR OWN RISK##

Use this as overlayer on the original strategy to set custom alerts.
Info: with this study script no buy/sell arrows show up op the chart.

Does some know a solution for this issue:
Issue: sometimes it gives a false signal because even when you set "one per bar close" the custom set alert might come halfway the bar....and it might be a false signal when the bar is closed
Does somone know a fix for this? I tried with barstate.iscomfirmed but it didn't work for me.

Ps. I'm not a developer...just changed the scipt by watching a youtube tutorial.
תגובות
Trendoscope
To avoid repaint, you can just use an offset in security function here.

reso(exp, use, res) => use ? security(tickerid, res, exp, gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on) : exp

Instead of this, use

reso(exp, use, res) => use ? security(tickerid, res, exp[1], gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on) : exp

Have some explanation in one of script on how to avoid repainting in strategies:
tradingview.com/script/5FvIVVS2-HTF-High-Low-Repaint-Strategy/
yourmattie
@HeWhoMustNotBeNamed, thanks for the advice, but if I lookt at the line of code that you gave me: both are the same😅
Could you give me the correct line of code?
It will be really helpful.
Thanks!

Or is this the correct code?
f_secureSecurity(_symbol, _res, _src) => security(_symbol, _res, _src, lookahead = barmerge.lookahead_(xxx)) : exp

(Xxx)= should i put there "on" or "off"?
Trendoscope
@yourmattie, oh sorry. It looks like square brackets are not allowed in the comments and it TV is automatically removing it.

Instead of exp use exp(1). This means you will be using last confirmed bar for calculation instead of current bar.

Note: replace with square brackets.
bomblevikas
@yourmattie, can you tell me result if I used Tema by change multiplier alternate 1 and MA period 30 please make back test
NumberGames
If at bar close is not working then to fix repaint issue in alert condition use [1]
This will give us the alert when condition is met in previous bar.
Alertcondition(xlong[1],
gmbox2000
Hey!
Could you give me access to a version that works with 3Commas bot? Thanks!
yc161969
pretty useful thanks
HBGJA
HelloYourmattie, is it possible to receive a strategy of this version?
sathish230177
can I get the non-repainting Indicator? Could you please advise
עוד