SeaSide420

Daily Candle Cross

867 25 81
simple cross of daily candle close
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
//                     simple cross of daily candle close
//
strategy("DailyCandleCross", shorttitle="DCC", overlay=true, calc_on_order_fills= true, calc_on_every_tick=true, default_qty_type=strategy.percent_of_equity, default_qty_value=75, pyramiding=0)
A=security(tickerid, 'D', close)
B=security(tickerid, 'D', close[1])
C=A>B
if(C)
    strategy.entry("Long", strategy.long)
if(not C)
    strategy.entry("Short", strategy.short)
This script was updated: DailyCandleCross
jashanjeet.singh
6 months ago
Thank You, very versatile. It seems to do much better in trending markets.
+1 Reply
UrbiGT
6 months ago
A=security(tickerid, 'D', close)
B=security(tickerid, 'D', close)


Hi repainter!
Reply
SeaSide420 PRO UrbiGT
6 months ago
you forgot about which is actually the key

you know every single indicator "repaints".... right?
why bother mentioning it? would you rather have indicator pile signal on top of signal at the moment of cross?
Reply
SeaSide420 PRO SeaSide420
6 months ago
oh thats right, this chat wont show that bit of script
Reply
slypydych
6 months ago
is it possible to put an alert function on this?
Reply
SeaSide420 PRO slypydych
6 months ago
yes
Reply
slypydych SeaSide420
6 months ago
I'm fairly new to pine script, I don't know if it's not available for it because I tried setting an alert and there wasn't an option, would you be able to code that into it?

Also, nice work on the indicator, very much appreciate it!!!
Reply
SeaSide420 PRO slypydych
6 months ago
I will. i have a few projects going, but i put it on teh list. i chat you when publish new version with alert.
there is quite a few request for alert to be added to the indicators. i do it.
Reply
slypydych SeaSide420
6 months ago
Thank you!
Reply
SeaSide420 PRO slypydych
6 months ago
Yo, so looking at alerts, seems cant be on strategy, so i make just indicator version, in which you can just click on teh indicator and choose alert and all that
DailyCandleCross

and here pic of possible settings of alert https://gyazo.com/d13710ee3a1f7d136ae483fe08b513cd
i dont use the alerts yet, but hopefully this right
Reply
slypydych SeaSide420
6 months ago
Thank you very much, this helps a lot!
Reply
SeaSide420 PRO
6 months ago
If you are surprised that this repaints, then you are a newB, and please dont bother mentioning it.
thankyou
Reply
lovymaan20
6 months ago
hi.. send me this strgy (indicator) (lovymaan20@gmail.com) ,, i wanna add this strgy in my chart how it posible tell me plz...
Reply
SeaSide420 PRO lovymaan20
6 months ago
https://www.tradingview.com/features
Reply
Hello SeaSide420,

Why do you think the purchase or sale indicator appears on some occasions and then disappears? sometimes even in aparce time you back even if I have monitored minute by minute which no longer gives me a valid entry has been a long time since.

another question, can I apply this code to EUR / USD and in what time frame do you think works best.

thanks for your answers
Reply
SeaSide420 PRO ChristianRiveraMora
6 months ago
indicator signal appearing and disappear is called repainting.
If you refresh page, the signal will re-calculate.
it simply looks at daily candle close value, and the previous daily candle close value
and if current price greater than previous candle price, then it signal buy, reverse is sell.
I have attempted to make non-repainting versions, but it just piles the signals on top of each other whenever the cross happens.
So, refresh page, if you think the price may have gone back across the Decision threshold.
I have made this strategy into a profitable EA for MT4 (trading robot) and I just tell it to have a SL of 33 pip and a trailing stop of 20 pip.
So sometimes the price dances around the decision threshold, crossing back and fourth, but once position is open, it closes by TP or trailing SL or hitting SL and then makes new decision by then price likely away from decision threshold. today i make new version of this, with daily candle values division by some large number before cross calculated so the value becomes very small and less likely for price to cross threshold.

Yes, it works on all FOREX pairs. timeframe 1H or 15M seemed best results.
Reply
SeaSide420 PRO SeaSide420
6 months ago
The EA version of this, shows a less (the true) percent profitable, but thats because it accepts small losses instead of repainting. so the real profitablity percent is in the 60's, but the larger profits cover the small losses, and backtesting results show average monthly profit of 100% of equity if use 10% position size (SL 33, trailSL 20, TP 420)
Forward testing is confirming results.
Reply
cjszbd
6 months ago
Could you explain in laymen's terms how this strategy works?
Reply
SeaSide420 PRO cjszbd
6 months ago
no
Reply
rich15stan
5 months ago
I love this strategy. if you dont mind me asking, what is this based on?
Reply
SeaSide420 PRO rich15stan
5 months ago
it really is simply a cross of Daily candle close.
which means:
when daily candle closes, it has a value, lets say 0.7015
during the next candle (day), the program compares the current price value to the previous close value.
If the current price is lower (0.7014), it will decide on SELL, if price higher (0.7016), then BUY.

this one works the same way, but is better.
Decision Threshold

the reason that one is better is because it does maths with the values.
it divides the value down into a fraction value, which makes less crossings as price wiggles past crossing value, so less repainting, it also has HullMA cross added to its thinking.
and also with that one you can set a StopLoss amount, and therefore see a more real performance in the report.

Yes it repaints, they all repaint. which means if you reload the page after price has gone back through decision threshold then it might "repaint" the signals.
refreshing the page will show perhaps signal change.
So, basically, if its wrong, and the page is refreshed, its wrong signal will disappear.
therefore the report showing 93% Percent Profitable is not correct for this strategy. you will get traderage when you follow its signal but it takes it back when its wrong.
fair enough too, i understand the newB traderage when loss happens due to Noobness. I do not recommend following this strategy signals blindly, but it is a great tool.

I am not too worried about repaint, as I made this strategy into an Expert Adviser for MetaTrader4 (automated trading robot). It does great, the actual profit percent is 60 - 70 %
(results: average monthly profit 50% of equity (SETTINGS: position_size=10%, TP=420 SL=33 Trail_SL=20 (pip)))
download it here for free http://ss420fx.blogspot.co.nz (Decision-Threshold EA)
+1 Reply
rich15stan SeaSide420
5 months ago
Thanks man that really helps a lot. I cant wait to download it and let it run on auto. Is that what timeframe you trade on is daily? I do daily, and 4hour. But I want to become a longer term trader like 3-4 days. I think this will really help. You do great work?
Reply
SeaSide420 PRO rich15stan
5 months ago
the EA runs on Daily chart for best results.
this strategy here on TV, best on 1 hour, but also ok on 15Minute
Cool how you put a question mark after the comment "you do great work?"
LOL as
Reply
rich15stan SeaSide420
5 months ago
lol yea didn't mean to put that at the end. Great, daily is what i'm going to start out working with. Was it hard to automate on MT4?
Reply
SeaSide420 PRO rich15stan
5 months ago
private message me for more info
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out