OPEN-SOURCE SCRIPT

Chimpanzee V2.5 part A by joylay83

Aktualisiert
Hi everyone, I am an amateur pinecoder. I would like to share my script which is coded with the intention of generating signals to send to 3commas webhook. It is still in development and revision.

Snapshot

This collection of indicators use:
Chart: 15m.
Inverse Fisher Transformation of the RSI to detect dips in the 15m timeframe.
Bollinger band (4H) to filter out false signals.
Triple EMA 21: to mimic price action for easier coding alerts. Currently not involved in generating signals. will be incorporated in the future.
StochRSI: As a visual filter. Currently not involved in generating signals. will be incorporated in the future.
Background will be green if stochRSI is low and red if stockRSI is high.
Candlesticks will be marked with a flag is TEMA breached BB.

One would need to play around with timeframes, BB settings and IFTRSI threshold for different signals.

There are 2 Signal Modes (with regards to IFTRSI):
Threshold: When price action falls below BB and IFTRSI hits buy threshold, a buy/sell signal is generated. Eg if IFTRSI buy threshold is set to -0.9, the buy signal will remain continuously positive as long as IFTRSI is < 0.9.
Cross: When price action falls below BB and IFTRSI hits threshold, nothing happens. It will wait until the IFTRSI cross back over the threshold before firing a signal.

Snapshot

There is another identical set of indicators running on a higher time frame (IFTRSI: 4H, BB: D or 3D, TEMA 21 4H) but on the same chart. This tend to generate less signals but are more reliable. A usage example would be to send a larger buy order if the signal comes from this higher time frame, or execute a sell order after multiple buys from the lower time frame.

It comes in 2 parts:
Part A: Contains overlay display. This displays BB, Triple EMA, buy/sell and StochRSI in labels. the labels are self explanatory.
Part B (please search for it): which is actually the same code but contain non-overlay display. You may also put part B overlay=true but scale to LEFT. The advantage of using overlay=true is that you can move the signal right over the candlesticks (mainly for troubleshooting/debugging). This part contains Inverse Fisher RSI, %B, Signal Line. %B is supposedly idential to Bollinger Bands in Part A.

By default, when there is a buy/sell signal:
lower time frame 15m: Signal Line in Part B will turn blue with a value 1 or -1 which corresponds to a buy or sell label in Part A
higher time frame 4H: Signal Line in Part B will turn red with a value 2 or -2 which corresponds to a HTF buy or sell label in Part A

Part A or B may be used to send signal to the webhook. You have to make sure that the settings of Part A and B are identical.
You may choose to un-display some items to reduce clutter.


Current problems:
1. Still too many buy signals
Although many times it will generate excellent buy signal at many swing lows, but there are many buy signals prior to a major swing low. This can be observed in the picture above. It also generate a couple of buy signals prior to the swing lows. I am currently experimenting with 20m and hourly timeframe to address this issue. More filters are needed eg an oscillator or detecting candlestick patterns.

2. Premature sell signals.
The sell signal is often generated at the beginning of a major bull run. My idea to solve this problem is to move to a higher timeframe and sell only when TEMA crossunder the upper bollinger band.

3. Lack of a backtester that can test multiple concurrent deals.
Buy -> Buy (average down) -> Buy (average down) -> Buy (average down) -> Sell

4. Lack of the ability to calculate average purchase price
Probably have to code it as a strategy

5. Display lag
As the browser is running 2 copies of the idential script, it tends to lag when you drag your chart around. So far there are no timeouts or delay in firing alerts to 3commas.


I do welcome any suggestion for improvement and constructive criticism. tqvm.


Credits : Thank you for doing an awesome job. I learnt a lot from your codes and tutorials.
Credits not listed in any order. If your code is used here and did not receive due credit, kindly drop me a note. tq.
Blessing 3 by JTA Today
ZenAndTheArtOfTrading (extremely-easy-to-understand tutorials eg fixing repainting)
LazyBear (various codes)
Galactus-B Argo I
TheTradingParrot (Inverse Fisher RSI and Gavin's backtester)
zendog123 (backtester and various codes)
ydeniz2000 (Bollinger Bands)
TradingView built-in scripts







Versionshinweise
Update:
1. code cleanup
2. BB can now have different upper and lower SD. you may use EMA or SMA.
3. HTF can be enabled/disabled as a whole or indivdual Indis.
4. Main vs companion plotting mode. Part B of this script have been hidden by mods because it was to similar to this script (Part A). so I hav included a script that you can easily switch from main to companion mode without altering too much codes. if you use companion mode: you need to set the overlay to false, or overlay to true and scale to scale.left..
5. Added smoothing for HTF but it somehow interferes with the BG color and also the trade signals. suggest to leave it disabled for now.

there is no strategy version yet for now. also no inbuilt backtester for now. might be included in the future.

Please let me know if you found any bugs. tq
Bollinger Bands (BB)Exponential Moving Average (EMA)inversefishertransformmulti-timeframeRelative Strength Index (RSI)

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?

Haftungsausschluss