pilotgsms

Mirocana Strategy

Check out this strategy.
for more information: mirocana.com
Von Favorisierten Skripten entfernen Zu Favorisierten Skripten hinzufügen
//@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
+6 Antworten
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!
Antworten
hi,could anyone suggest me how to apply an alarm to this strategy?
+6 Antworten
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.
Antworten
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)


+22 Antworten
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
Antworten
Kermit70 Kermit70
this is the error report:

line 11: mismatched input 'strategy.exit' expecting 'end of line without line continuation'
Antworten
@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 Antworten
Kermit70 kunjanverma
@kunjanverma,

Hi friend, you are really kind. Thank you for your reply and best wishes!!!
Antworten
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 Antworten
Startseite Aktien-Screener Forex-Screener Krypto-Screener Wirtschaftskalender So funktioniert es! Chartmerkmale Preise Hausregeln Moderatoren Webseite & Brokerlösungen Widgets Charting Lösungen Hilfe holen Feature-Anfrage Blog & News FAQ - Häufige Fragen & Antworten Wiki Twitter
Profil Profileinstellungen Konto und Abrechnung Hilfe holen Veröffentlichte Ideen Followers Ich folge Private Nachrichten Chat Abmelden