The PineCoders Backtesting and Trading Engine is a sophisticated framework with hybrid code that can run as a study to generate alerts for automated or discretionary trading while simultaneously providing backtest results. It can also easily be converted to a TradingView strategy in order to run TV backtesting. The Engine comes with many built-in strats for...
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...
This long only strategy determines the price of the last fractal top and enters a trade when the price breaks above the last fractal top. The strategy also calculates the average price of the last fractal tops to get the trend direction. The strategy exits the long trade, when the average of the fractal tops is falling (when the trend is lower highs as measured by...
This is my second Version of Heikin Ashi Strategy.
-Different Time Frame for Fast EMA and Slow EMA
-MACD Filter with own Time Frame
You can tweak around with settings , but defaults gives good results in Forex,Stocks and Index.
I also made an Alert Script
This simple indicator gives you a lot of useful information - when to enter, when to exit
and how to reduce risks by entering a trade on a double confirmed signal.
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
WARNING: this strategy repaints after reloading and results are heavily curve fitted, use at your own discretion.
UPDATE: (AleksanderThor) add option for a 2nd target, to use you need to activate pyramiding with a setting of 1 manually (not possible to change programatically) .
This Strategy is based on LazyBear Squeeze Momentum Indicator.
I added some custom feature and filters.
You can customize a lot of features to get a profitable strategy.
Here is a link to original study.
If you like my scripts and find it usefull to you, please consider to offer me a coffee:
Donate 1$ or BTC equivalent at my blockchain wallet.
This startegy is a port of famous script Wave Trend Oscillator.
Original study from LazyBear
Scope of this port is to identify corrects inputs to get best results from signals that indicator gives.
I attached it to chart with heikin ashi candles to have a better result and remove noise: results are good.
If you like my scripts and find it...
Simple Renko strategy, very profitable. Thanks to vacalo69 for the idea.
Rules when the strategy opens order at market as follows:
- Buy when previous brick (-1) was bearish and previous brick (-2) was bearish too and actual brick close is bullish
- Sell when previous brick (-1) was bullish and previous brick (-2) was bullish too and actual brick close is...
Here is a scirpt of ChrisMoody modified with the alerts of purchases and sales.
I just have a problem with automation. At the bottom of my script my alerts "Buy1" and "Sell2" give alerts constantly and I wish to have a single alert before the order is completed. Before "Sell1" or Buy2 ".
I found the function "barstate.isfirst" that could possibly...
A simple but effective Forex strategy requested by user @pipcollector.
Suggested chart timeframe is 5mins.
Indicator marks potential long/short entries based on the following conditions:
Price above pip median ema on daily, 4 hour and 1 hour timeframe. These 3 timeframes and median EMA lengths are configurable.
Background color is set to GREEN...
This strategy combines the classic stochastic strategy to buy when the stochastic is oversold with a classic MACD strategy to buy when the MACD histogram value goes above the zero line. Only difference to the classic stochastic is a default setting of 71 for overbought (classic setting 80) and 29 for oversold (classic setting 20).
Therefore this strategy goes...
This strategy is based off of Chris Moody's Vix Fix Indicator. I simply used his indicator and added some rules around it, specifically on entry and exits.
Enter upon a filtered or aggressive entry
If there are multiple entry signals, allow pyramiding
Exit when there is Stochastic RSI crossover above 80
This works great on a number of stocks. I am...
Strategy based on the bilateral stochastic oscillator, this oscillator aim to detect trends and possible reversal points of the current trend. The oscillator is composed of 1 bull line in blue and 1 bear line in red as well as a signal line in orange, the strategy have many options such as two different strategy framework and a martingale mode. If...
*** THIS IS JUST AN EXAMPLE OF STRATEGY RISK MANAGEMENT CODE IMPLEMENTATION ***
For my own future reference, and for anyone else who needs it.
Pine script strategy code can be confusing and awkward, so I finally sat down and had a little think about it and put something together that actually works (i think...)
Code is commented where I felt might be necessary...