Strategy NNFX Tester

Strategy NNFX, Baseline, QQEs Fast C1, Slow C2, ATR, Volume and Exit

This is a Strategy Tester designed to work with Study (Alerts) of the same.

At time of creation based on Revision 8 of the Study.

DO NOT USE the Currency/Money Management section under settings. use the position sizing under "Inputs" - "Money Management" - "Risk per trade" which is defaulted to 2%

This has adjustable Baselines, Exits, ATR calculations, C1 and C2 are currently QQE & QQE Histo with adjustable settings but I'll include more choice of C1 & C2 as time goes on.

Find settings that work for you, then move them over to the Study version for best results.

Forward plans are to add much more options to both Alert/Strategy.

If anyone wants to collaborate or anything hit me up.
Phát hành các Ghi chú: Revision 2 allows switching off Confirmation Indicators and Volume to allow test of Baselines/Exits without these.

Will make more switchable over time
Phát hành các Ghi chú: Separated C1 & C2 in entry rules

Created structure to add more C1 and C2 indicators

Changed TP/TSL exit position comments to reflect what the Exit Trade Reason was
Phát hành các Ghi chú: Lots of behind the scenes updates tidying up code, making more structured and modular to allow additional Indicators to be introduced later.

Some small bug fixes in Strategy Positions and Counters.

Added Continuation trades logic.

*** PLEASE message me if you have any extra C1 & C2 indicators you want added ***

All future updates will be rolled back across to the Alert Version for Daily Trading.
Phát hành các Ghi chú: Added C2 indicators

Super Trend & Absolute Strength Historian
Phát hành các Ghi chú: Added Vortex Indicator C1
Phát hành các Ghi chú: Added Awesome Oscillator as C1 Indicator

*** Please contact me with other C1 & C2 Indicators to add to Strategy ***

Planned to update Alert Study to match Strategy End April 2021
Phát hành các Ghi chú: Bug Fix
Phát hành các Ghi chú: Added KDJ C2
Phát hành các Ghi chú: Added SSL as C1 & C2 indicators

Tidied code, organised menus, changed some defaults.

Added "Inspirational" quote to end of code ;)
Phát hành các Ghi chú: Added Filter for $EVZ value, lower limit to block trades, and upper limit to double risk
Phát hành các Ghi chú: Added WAE Explosion Selectable/Tunable Volume Indicator
Phát hành các Ghi chú: added C1 Cronex T Demarker
added C1 Squeeze Momentum Indicator
added C2 Kuskus Starlight
added C2 FX Sniper Ergodic
Phát hành các Ghi chú: Added 3 new C1 indicators and 3 x C2 indicators. Now Totaling 10 of each.

Added calculations for extra pairs, so backtest now works correctly for all the following in any combination;

Phát hành các Ghi chú: General tidy up of menus
Phát hành các Ghi chú: Added option for rule "Only Enter after/on candle moving in direction of trade"

This prevents entering a Long at the end of a Red Candle, and a short at the end of a green candle.

Prevents entry on the end of a pullback however, so backtest it's use with your Algo
Phát hành các Ghi chú: Bug fix in Currency conversion and Trailing Stops
Phát hành các Ghi chú: Enabled selection of Stop Losses.

Trailing stop, fixed stops or Fixed/Trailing.

Fixed trailing starts as Fixed Stops, once TP1 hits, SL for remaining half of the trade moves to a trailing stop!
Phát hành các Ghi chú: Added ability to move SL to Break Even once TP1 is hit on Fixed Stoploss stategy
Phát hành các Ghi chú: Additional C1 Indicator - ATR+Kijun-Sen

New function - Currency Strength Filter

Currencies pairs ranked by strength from 0 to 10
Filter selectable for both initial trade and continuation trades separately.
Currently working for AUD, CAD, CHF, EUR, GPB, JPY, NZD & USD.
For currencies not yet covered, trades will not be filtered and will continue as normal.
Phát hành các Ghi chú: Added maximum number of securities to Strength filter.

Currencies covered are - EUR, USD, JPY, CHF, GBP, AUD, CAD, NZD, SGD, HKD, PLN, ZAR

Other currencies remain unfiltered

Bug fix in Currency Strength
Phát hành các Ghi chú: Fixed bug in Stop loss functions
Phát hành các Ghi chú: Simple Moving Average with offset bands above and below it applied to the profit curve.

Above upper band High Profit, between upper band and MA average Profit, between Ma and low band Low Profit, and below lower band Critical profit.

Increase or reduce position sizes based on current profit to dynamically increase/reduce risk based on recent results.
Also set Win/Loss ratio based on last 30 bars, for the High Profit Risk Value to be applied. This allows you to take advantage of a win streak/turn in performance of Algo, and to potentially get Profit above MA again when operating in reduced risk zone.

Also a warning MA on Profit, defaulted to 200 period. Prints warning on right hand side "Profit Above/Below MA, Do/Do Not trade"
Research suggests the profit of a strategy dropping below 200ma on the profit/equity curve may be a good point to move to paper trade only on instrument until performance goes back above.
Phát hành các Ghi chú: Updated Risk Warning MA to 2x Ma's on Profit curve.

Warning to reduce risk when profit is under either the long or short MA, Warning to Stop Trading when Profit is under both MA's.
Phát hành các Ghi chú: Update to Currency Strength Filter - Currencies rated under 1 were rounded to 0, and 0 was allowed through the filter as non ranked currencies scored 0.

Changed to all non ranked currencies (maximum securities in 1 script reached) get a score of 10 now, all others get ranked and you can filter weakest pairs.

Broken trade only after candle with momentum in direction of trade into two parts, innitial trade and continuation.

This allows entry on a pullback, but once an a trade is entered and closed, continuation signal can be prevented unless preceded by a candle in the direction of continuation. Avoids entering continuation in a falling price environment even if trend indicators still show a go signal.
Phát hành các Ghi chú: Added hide overlay for when using the strategy alongside Study version.

Added short tags to be displayed above detailing "Safe Trade", "Caution" and "DO NOT TRADE" based on whether the strategy has been profitable recently on this pair.
Only displays when overlay hidden.

Adjust the Profit warning MA's to adjust profit warning sensitivity.

Caution is where Profit is above one MA but not the other, so climbing/falling.

Reference top be made to profit graph to verify before trading.
Phát hành các Ghi chú: Changed calculations for strategy from % of starting capital to % equity

Changed colours of text to match colours of Alert Study.

Blue Long Entry, Red Short Entry, Yellow Exit and Grey for no action.
Phát hành các Ghi chú: Added option to disable continuation trades

Added option to select C1 or C2 instead of SSL for exits

Replaced Dynamic Risk with Kelly Ratio Position sizing
Phát hành các Ghi chú: Fixed SL issue. Removed Trailing stops for simplification (I personally only use Fixed losses now as I use MT5 Web for my Prop account).

Added ability to Remove Baseline, Remove Exit Indicator, use only a single position rather than have a second run on position, removed Currency strength filter as it was slowing code.
Mã nguồn mở

Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Bình luận

100 xu
Phản hồi
@Opyt, cheers man.

As we discussed I'm happy to add extra functionality if anyone has suggestions.

I'm working on a dynamic risk management function at the moment which I believe should add real value
+1 Phản hồi
Opyt chrisfraser05
@chrisfraser05, Great work you're doing. My next step is to turn my backtested strategy into an EA to paper trade, which is a hurdle because I know nothing about MT4/MT5
Phản hồi
@Opyt, yea that's part of my long term plans too.

I've got someone elses MT5 Beta EA running demo at the moment, it's doing well in demo.

I want to make my own from the ground up, using things I learn here on TV in the mean time.

If TV introduce Automated Trading however I'm in!!!!!
Phản hồi
Thanks for everything you're doing! Sent you a PM....I think.
200 xu
Phản hồi
@Opyt, thanks so much bud!!!!
Phản hồi
I cannot get this script to show up on my chart, what is going on?
Phản hồi
Hi Chris,
Love the code and exceptional programming. Have been dissecting it the last couple of days and adapting some for my NNFX testing.

- ATR bands on baseline, rather than on price (high/low)
- Exit on C1 or exit indicator options - rather than just on baseline - doing this currently combining your and DG's code
- A real challenge - only have setting options available for indicators being used - am doubtful this is possible as pinescript is limited and would need to close and add to chart every time.

I won't waste your time with other indicators. That's the easy bit.

Phản hồi
@klechas, hey bud, cheers for the feedback.

I'll definitely take a look into hiding the inputs.

The bands are using the same Calculations as the inputs so would need separated, I do personally like the bands reflecting the ATR of the close price when a candle closes (so you can see where the Trailing stop would have been).

I could made it selectable between the 2 options maybe?!?

I agree about using other options not just the SSL as exit. I'll add that onto the roadmap for the next few weeks!!!!

Phản hồi
@klechas, I've just uploaded an update with the use of C1 or C2 instead of the existing SSL for exits.

few other additions at the same time.
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Giới thiệu Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter