Strategy Gaussian Anomaly DerivativeConcept behind this Strategy :
Considering a normal "buy/sell" situation, an asset would be bought in average at the median price following a Gaussian like concept. A higher or lower average trend would significate that the current perceived value is respectively higher or lower than the current median price, which mean that the buyers are evaluating the price underpriced or overpriced.
This behaviour would be even more relevent depending on its derivative evolution.
Therefore, this Strategy setup is based on this Gaussian like concept anomaly of average close positionning compare to high-low average derivative, such as the derivative of the following ploted basic signal : 1-(high+low)/(2*close).
This Strategy can actually be used like a trend change and continuation strength indicator aswell.
In the Setup Signal part :
You can define the filtering of the basis signal "1-(high+low)/(2*close)" on EMA or SMA as you wish.
You can define the corresponding period and the threathold as a mutiply of the average 1/3 of all time value of the basis signal.
You can define the SMA filtering period of the Derivative signal and the corresponding threathold on the same mutiply of the average 1/3 of all time value of the derivative.
In the Setup Strategy part :
You can set up your strategy assesment based on Long and/or Short. You can also define the considered period.
The most successful tuned strategies I did were based on the derivative indicator with periods on the basis signal and the derivative under 30, can be 1 to 3 of te derivative and 7 to 21 for the basis signal. The threathold depends on the asset volatility aswell, 1 is usually the most efficient but 0 to 10 can be relevent depending on the situation I met. You can find an example of tuning for this strategy based on Kering's case hereafter.
I hoping that you will enjoy using this Strategy, don't hesitate to comment, to question, to correct or complete it ! I would be very curious about similar famous approaches that would have already been made.
Thank to you !
Close
Open Close Cross Strategy plus ExplorerOpen Close Cross Strategy plus Explorer
V 1.0
There is a code that can control sensitivity. try to change 'ATR Multiplier' menu
There is a code for prevent 'repaint'. If you want it check 'Forces Non-Repainting' menu
thanks to
PMax Explorer STRATEGY & SCREENER KivancOzbilgic
Open Close Cross Strategy R5 revised by JustUncleL JustUncleL
Close Trade at end of day script serves as an example how we can close trades at end of day.
can be session controlled or the time controlled.
the session should be adjusted to be earlier than the candle time.
Monthly MA Close Generates buy or sell signal if monthly candle closes above or below the signal MA.
Long positions only.
Inputs:
-Change timeframe MA
-Change period MA
-Use SMA or EMA
-Display MA
-Use another ticker as signal
-Select time period for backtesting
This script is not necessarily written to maximize profits, but to minimize losses.
Although it can outperform 'Buy & Hold' on some occasions when there is a multiple month bearisch trend.
You can optimise this strategy by changing the signal MA inputs.
I would suggest aiming for the best Profit Factor starting from the monthly ("M") setting.
You can always fine-tune the results at a lower timeframe.
The option to use another ticker for providing signals can give you a more stable and unified results.
For example using AMEX:SPY as signal with default parameters gives better results with NASDAQ:AAPL than if you would use NASDAQ:AAPL itself.
I used the anti-repainting function from PineCoders to prevent repainting.
This script is best used for multi-month trading positions & Daily or 4H setting of your chart.
Open Close Cross Strategy // Real Back Test // Not goodI changed close series because, close series doing repaint.
I changed the near series with the previous open series .
but can use for sup and resistance
Daily Close repainting resultsit's a repainting script cheating on tester, on backtesting %100 correct but on forward testing it will only work % 15 correct and %85 wrong. I did another script showing real forward testing results of this script.
Open Close Cross Strategy R5 revised by JustUncleLThis 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.