JustUncleL

Open Close Cross Strategy R5 revised by JustUncleL

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.

*** USE AT YOUR OWN RISK ***
JayRogers : "There are drawing/painting issues in pinescript when working across resolutions/timeframes that I simply cannot fix here.. I will not be putting any further effort into developing this until such a time when workarounds become available."
NOTE: Re-painting has not been observed with the default set up, nor with Alternate resolution multiplier up to 5.

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

Setup:
  • I have generally found that setting the strategy resolution to 3-5x that of the chart you are viewing tends to yield the best results, regardless of which MA option you may choose (if any) BUT can cause a lot of false positives - be aware of this. JustUncleL: using one of the Smoothed MA helps reduce false positives.
  • Don't aim for perfection. Just aim to get a reasonably snug fit with the O-C band, with good runs of green and red. JustUncleL: using SMMA (8 to 10) gives a good fit.
  • Option to either use basic open and close series data, or pick your poison with a wide array of MA types.
  • Optional Stop Loss and Target Profit for damage mitigation if desired (can be toggled on/off)
  • Positions get taken automatically following a crossover - which is why it's better to set the resolution of the script greater than that of your chart, so that the trades get taken sooner rather than later.
  • If you make use of the stops/target profit, be sure to take your time tweaking the values. Cutting it too fine will cost you profits but keep you safer, while letting them loose could lead to more draw down than you can handle.

Revsion R5 Changes by JustUncleL
  • Corrected cross over calculations, sometimes gave false signals.
  • Corrected Alternate Time calculation to allow for Daily,Weekly and Monthly charts.
  • Open Public release.

Revision R4 By JustUncleL
  • Change the way the Alternate resolution in selected, use a Multiplier of the base Time Frame instead, this makes it easy to switch between base time frames.
  • Added TMA and SSMA moving average options. But DEMA is still giving the best results.
  • Using "calc_on_every_tick=false" ensures results between back testing and real time are similar.
  • Added Option to Disable the coloring of the bars.
  • Updated default settings.

R3 Changes by JustUncleL:
  • Returned a simplified version of the open/close channel, it shows strength of current trend.
  • Added Target Profit Option.
  • Added option to reduce the number of historical bars, overcomes the too many trades limit error.
  • Simplified the strategy code.
  • Removed Trailing Stop option, not required and in my option does not work well in Trading View, it also gives false and unrealistic performance results in back testing.

R2 Changes by @JayRogers:
  • Simplified and cleaned up plotting, now just shows a Moving Average derived from the average of open/close.
  • Tried very hard to alleviate painting issues caused by referencing alternate resolution.

Aug 08
ملاحظات الأخبار: R5.1 Changes by JustUncleL
  • Upgraded to Version 3 Pinescript compliance.
  • Added option to select Trade type (Long, Short, Both or None)
  • Added bar colouring work around patch.
  • Some code corrections and changes to improve efficiency.

NOTE: To enable non-Repainting mode set "Delay Open/Close MA" to 1 or more, but expect the reported performance to drop dramatically.
Aug 08
ملاحظات الأخبار: Bug fix
Correction on SuperSmooth MA calculation.
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة
JustUncleL
Hi JustUncleL,

I really like this strategy.
Do you have the MQL4 code so I can test it on MT4 ?

Best regards
رد
@PAL2BLG, No I don't code in MQL4.
رد
JustUncleL ThiagoFrank
@ThiagoFrank, I am well aware of the repainting issues with using multiple time frames and of PinescriptScriptV3 solution. However, the original idea with this script was to not completely remove repainting but to try and get the earliest signal then act on it with some further chart analysis, there is plenty of time to do that with my suggestion of 1hr or higher time frame charts.
رد
ThiagoFrank JustUncleL
@JustUncleL, I will try it with 1h TF. Thanks a lot!!
رد
Hi! Is it possible to use alerts with this strategy? I am trading cryptocurrencies and want to know good entry prices.
رد
JustUncleL ThiagoFrank
@ThiagoFrank, Alerting cannot be used currently with any "Strategy" type script. Only "Study" scripts can be used with the TradingView alert/alarm subsystem, this is why I created the sister study script called "Open Close Cross Alert R6 by JustUncleL".
رد
Re-painting. Dont use this.
رد
JustUncleL KrolikRoger
@KrolikRoger, The re-painting issues are well known and were in the warnings of using this script, re-painting can be eliminated by setting the "Delay Open/Close MA" to 1, but the results will not be as good. You have to be very careful with using multiple Time Frame scripts, most of them will re-paint.
رد
pabloses KrolikRoger
@KrolikRoger, @JustUncleL setting the "Delay Open/Close MA" to 1, add fees and it will wipe out your account. So what is the purpose of this script ? Can be real result different using "Delay Open/Close MA" set to 0 ?
رد
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي برامج تعليمية كيف نعمل مميزات الرسم البياني أسعار العضوية قوانين الموقع المشرفون حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم مركز المساعدة إحالة صديق طلب الخصائص المدوّنة والأخبار الأسئلة الأكثر شيوعًا معرفة تويتر
الملف الشخصي إعدادات الصفحة الشخصية الحساب وإعداد الفواتير إحالة صديق تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تتابع رسالة خاصة المحادثة تسجيل الخروج