OPEN-SOURCE SCRIPT

Grid Tool

تم تحديثه
The core idea of this grid tool is that you have to concentrate less on the trade entries (this happens automatically time-independent but price-dependant) but rather on the validity of the macro trend. Exiting a trend when it is no longer valid is more important than entering a trade. But as long as the trend is valid, the trader participates exponentially in the overall trend.

It is advisable to start with a basic position and then "set up" the grid on this in a ratio of 1/10.

A major advantage of grid trading is that the average entry price in a trend moves further and further away from the current market price while the position continues to grow.

A small timeframe should be used so that the distance between the trades corresponds as closely as possible to the selected grid gap and since TV backtests are carried out with closed bars.

Before starting a grid, pre-analysis the market to make sure it is trending. Select the grid gap and grid position size that you are comfortable with. Monitor the trend and from time to time take some profit :).

PS: The ADX filter looks interesting.
ملاحظات الأخبار
Selectable timeframes for exit filters added.
ملاحظات الأخبار
Take Average-Entry Profit added. I think the option of automatic profit-taking makes sense.
ملاحظات الأخبار
Screenshot issue.
ملاحظات الأخبار
Additional time frames for exit filters added.
Two fractals trend lines as entry-filter and exit-filter added.
ملاحظات الأخبار
Entry filter timeframes added.
ملاحظات الأخبار
Tooltips added and minor changes.
ملاحظات الأخبار
Minor changes.
ملاحظات الأخبار
Sorry... take profit is now working with shorts correctly. I'm too much long focused at Bitcoin :) .
ملاحظات الأخبار
Minor changes.
ملاحظات الأخبار
Changed/adapted the strategy parameters.
ملاحظات الأخبار
Automatic increase in position size for each trade (Martingale) added. In my opinion, Martingale is too risky to trade. But it's part of trading...
ملاحظات الأخبار
Stop loss based on average-entry price added.
ملاحظات الأخبار
First position size factor added.
ملاحظات الأخبار
Local top/bottom added as start price for stop loss grid (position reduction starts earlier).
ملاحظات الأخبار
Pin bar entry signal added.
Automatic increase in position size revised.
ملاحظات الأخبار
Minor changes.
ملاحظات الأخبار
Screenshot issue.
ملاحظات الأخبار
Strategy comments revised.
ملاحظات الأخبار
"Bug" fixed.
ملاحظات الأخبار
Tooltips revised.
ملاحظات الأخبار
"Top/Bottom sensitivity" added.
ملاحظات الأخبار
"First position" bug fixed.
Minor improvements.
ملاحظات الأخبار
Script revised and some new features/improvements added.
ملاحظات الأخبار
Removed "Backtest (...)".
ملاحظات الأخبار
Repainting option added.
ملاحظات الأخبار
Strategy entry id bug fixed.
ملاحظات الأخبار
Script converted to Pine v5.
"Quantity" for exit filters added.
ملاحظات الأخبار
Info panel for unrealized profit/loss added.
Bug fixes.
New filters added (ema1 x ema2, macd slope, hma).

ملاحظات الأخبار
Filter and exits revised.
Trade direction "both" added.
ملاحظات الأخبار
Strategy border levels added.
Repainting revised.
Live trading parameters for Alertatron and Bybit added (I am not an affiliate of them. I am just using their services).
ملاحظات الأخبار
"Strategy trigger and border levels" bug fix.
ملاحظات الأخبار
Panel revised.
ملاحظات الأخبار
Script revised (filters, exits, live trading comments).
ملاحظات الأخبار
Exit bug fixed.
ملاحظات الأخبار
"Remain idle after crossing border level" added.
Bollinger Bands added.
Scalping mode is unfinished.
ملاحظات الأخبار
Minor corrections.
ملاحظات الأخبار
Minor changes. pubished to get help with mutable variable.
ملاحظات الأخبار
Bollinger Bands filter revised.
Button "Close All When Border Level Is Crossed." added.
ملاحظات الأخبار
Live trading bug fixed / conditions revised.
TP and SL counter added.
Break even added.
ملاحظات الأخبار
Border level logic revised (read tooltips for more info).
ملاحظات الأخبار
Border level logic revised.
ملاحظات الأخبار
"Border level close" revised.
ملاحظات الأخبار
Code revised/updated.
Inputs rearranged.
Trigger and border lines revised.
ملاحظات الأخبار
Inputs rearranged for a better usability.
"Instant Grid" added.
"Instantly On Current Bar Close" option for 1st Entry added.
Trigger and border lines are bar high/low sensitive now.
In backtesting, everything seems to be working as it should. Everything is also implemented for live trading but I haven't tested it live yet.
ملاحظات الأخبار
Close Partly On Break Even added.
ملاحظات الأخبار
Break even on live trading bug fixed.
ملاحظات الأخبار
Minor changes.
ملاحظات الأخبار
"Close & Stop" added.
ملاحظات الأخبار
Screen shot issue.
ملاحظات الأخبار
Live trading bug fixed.
ملاحظات الأخبار
Live trading bugs fixed. "Auto increase in position size" bug on live trading is still pending.
ملاحظات الأخبار
"Min Lot Size" for repetitive break even on backtesting added.
Break even bug fixed.
ملاحظات الأخبار
Made break even "Min Lot size" available for live trading.
ملاحظات الأخبار
Short entry bug fixed.
ملاحظات الأخبار
Added scalper mode (only for backtesting). This still needs to be worked out, but hopefully conveys the idea I was trying to implement. I'm not following the development any further as it doesn't make sense with the current state of Tradingview's 'Strategy Tester'. Further development would only make sense with a 'strategy tester' similar to that of MT4/MT5.

The example doesn't use the scalping mode. All parameters are default but Trade direction = short, trend start = 2022-08-10, Break even = "Partly close" enabled, Stop loss count = enabled
filtersgridtradingTrend Analysis

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية