拜托,我需要一些关于要遵循的策略、要使用的命令等方面的建议。。. 在移动平均线的交叉点附近获得一组(例如 3 支)日本蜡烛的最小值,以便在那里设置我的止损并以某种方式指示给出该最小值的蜡烛: https://imgur。 com/a/qjltm6T
这是我目前正在开发的代码。这是一个更大的一小部分: https ://imgur.com/a/qVDm9bE
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Dark_Trader-x01
//@version=4
strategy("SL_around_cross", overlay=true)
// DECLARACION DE VARIABLES
var float sl = na
// EMAs
EMA_9 = ema(close, 9)
EMA_21 = ema(close, 21)
EMA_100 = ema(close, 100)
// CONDICION CRUCE EMAs
cruce_BUY = crossover(EMA_9, EMA_21)
cruce_SELL = crossunder(EMA_9, EMA_21)
// STOP-lOSS
if cruce_BUY
sl := lowest(close, 3)
// TAKE PROFIT
// ESTRATEGIA
/// ALCISTA
//strategy.entry("BUY", true, 2000, when = candle_BUY_activada)
//strategy.close("BUY", when = cruce_SELL)
/// BAJISTA
//strategy.entry("SELL", false, 2000, when = candle_SELL_activada)
//strategy.close("SELL", when = cruce_BUY)
// PLOTS
plotshape(cruce_BUY, style=shape.arrowup, text="cruce_BUY", location=location.belowbar, color=color.green)
plotshape(cruce_SELL, style=shape.arrowdown, text="cruce_SELL", location=location.abovebar, color=color.red)
欢迎任何建议!
先感谢您!