pilotgsms

Mirocana Strategy

Check out this strategy.
for more information: mirocana.com
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
//@version=2
strategy("Mirocana.com", overlay=true, currency=currency.USD, initial_capital=10000)
dt = input(defval=0.0010, title="Decision Threshold", type=float, step=0.0001)

confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close[1]))/security(tickerid, 'D', close[1])
prediction = confidence > dt ? true : confidence < -dt ? false : prediction[1]

bgcolor(prediction ? green : red, transp=93)

if (prediction)
    strategy.exit("Close", "Short")
    strategy.entry("Long", strategy.long, qty=10000*confidence)

if (not prediction)
    strategy.exit("Close", "Long")
    strategy.entry("Short", strategy.short, qty=-10000*confidence)
    
    
    
fake
+7 Phản hồi
Does anyone know how to write this script to be applicable to the daily candles for swing trading? It is obviously focused on day trading based on the results. I recognize that the signals repaint, but I'm finding that if I add in Heikin Ashi candles and even an oscillator such as the Awesome Oscillator for further analysis/confirmation, it can yield some good results. FYI, I'm currently attempting to learn Pine. I do not have a development background, so there is a little bit of a learning curve. Any help that can be provided will be greatly appreciated.Thanks!
Phản hồi
hi,could anyone suggest me how to apply an alarm to this strategy?
+7 Phản hồi
Hello, I'm interested in the news indicator at the bottom of the graph, as it is called, you can get the script because it looks like in the picture? Thank you.
Phản hồi
version 3 does not repaint(https://www.tradingview.com/wiki/Pine_Script:_Release_Notes). So with some change, it does not repaint:

//@version=3
strategy("Mirocana.com", overlay=true, currency=currency.USD, initial_capital=10000)
dt = input(defval=0.0010, title="Decision Threshold", type=float, step=0.0001)

confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close))/security(tickerid, 'D', close)
prediction = confidence > dt ? 1 : confidence < -dt ? 0 : -1

//bgcolor(prediction ? green : red, transp=93)

if (prediction == 1)
strategy.exit("Close", "Short")
strategy.entry("Long", strategy.long, qty=10000*confidence)

if (prediction == 0)
strategy.exit("Close", "Long")
strategy.entry("Short", strategy.short, qty=-10000*confidence)


+24 Phản hồi
Kermit70 kunjanverma
@kunjanverma,

hi friend, I tried to load this script as you wrote it but it doesn't work. Would you have any suggestions?
Thank you
Phản hồi
Kermit70 Kermit70
this is the error report:

line 11: mismatched input 'strategy.exit' expecting 'end of line without line continuation'
Phản hồi
kunjanverma Kermit70
@Kermit70, use this:

//@version=3
strategy("Mirocana.com", overlay=true, currency=currency.USD, initial_capital=10000)
dt = input(defval=0.0010, title="Decision Threshold", type=float, step=0.0001)

// Date range filter
testStartYear = input(2018, "Backtest Start Year")
testStartMonth = input(1, "Backtest Start Month")
testStartDay = input(1, "Backtest Start Day")
testPeriodStart = timestamp(testStartYear, testStartMonth, testStartDay, 0, 0)

testStopYear = input(2018, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(31, "Backtest Stop Day")
testPeriodStop = timestamp(testStopYear, testStopMonth, testStopDay, 0, 0)

inTimeRange = time >= testPeriodStart and time <= testPeriodStop

confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close))/security(tickerid, 'D', close)
//confidence=(security(tickerid, '60', close)-security(tickerid, '60', close))/security(tickerid, '60', close)
prediction=close>close
prediction:=confidence > dt ? true : (confidence < -dt ? false : prediction)

bgcolor(prediction ? green : red, transp=93)

goLong = prediction and inTimeRange
goshort = (not prediction) and inTimeRange

strategy.entry("Long", strategy.long, qty=10000*confidence, when=goLong)
strategy.close("Long", when=goLong)
strategy.entry("Short", strategy.short, qty=-10000*confidence, when=goshort)
strategy.close("Short", when=goshort)
/////////////

But now as you can see this script has such bad results in backtesting. Pretty useless now. :)
+1 Phản hồi
Kermit70 kunjanverma
@kunjanverma,

Hi friend, you are really kind. Thank you for your reply and best wishes!!!
Phản hồi
It's fake... Signals are put at the past candles when the actual price turned around and walked a few candles)... Really is a good picture, which is based on history, but it is not a strategy.
I think that the principles of such strategies should be disclosed in the description, or people should be warned that the signals are put on a few candles ago.
+18 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ế Shows Cách thức hoạt động Tính năng Biểu đồ Giá Quy tắc Áp dụng Người điều hành Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Trung tâm Trợ giúp Giới thiệu bạn Yêu cầu tính năng Blog & Tin tức Câu hỏi thường gặp Wiki Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất