// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // This strategy has been created for illustration purposes only and should not be relied upon as a basis for buying, selling, or holding any asset or security. // © Diamond //@version=5 strategy('SMA Golden Short Strategy', overlay=true, calc_on_every_tick=false, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_value=0.04, commission_type=strategy.commission.percent) //Inputs smaFast = input.int(title='Fast SMA', defval=50, minval=1) smaSlow = input.int(title='Slow SMA', defval=200, minval=1)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // This strategy has been created for illustration purposes only and should not be relied upon as a basis for buying, selling, or holding any asset or security. // © Diamond //@version=4 strategy("SMA Golden Cross Strategy", overlay = true, calc_on_every_tick = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, commission_value = 0.04, commission_type = strategy.commission.percent)Доступно редактирование 4 переменных: период быстрой средней, период медленной средней, даты начала и конца бэктеста:
Первый шаг — сделать непонятные системные маркеры более «человекоподобными». Например, пусть маркер высокого риска будет называться BUY CAREFULLY — я по-прежнему могу купить в этом месте, но нужно чётко понимать, что вероятность получить убыток будет максимальной. Сами маркеры стали больше и аккуратнее.
Затем нужно было добавить разделение рынка на «стабильный» и «турбулентный», они обозначены зелёным и красным фоном. Стабильный рынок имеет выраженное восходящее направление движения, а в турбулентном можно получить много ложных сигналов или вовсе попасть в затяжной даунтренд: