Dragon Bot - Default Script

Dragon Script is a framework to make it as easy as possible to test your own strategies and set alerts for external execution bots.
The script has many features build in, like:
1) A ping/pong mechanism between longs and shorts
2) A stop-loss
3) Trailing Stops with several ways to calculate them.
4) 2 different ways to flip from long to short.

The script is divided into several parts.

The first part of the script is used to set all the variables. You should normally never change the first part except for the comments at the top.
The second part of the script is the part where you initialise all your indicators. Several indicators can be found on Tradingview and on other sites. Please keep in mind that all the variable names used in the indicator should be unique. (all the … = … parts)

The third part of the script, is the most important part of the script. Here you can create the entry and exit points.
Let’s look at the OPENLONG function to explain this part: The first variables are all the possible entries; These are longentry1 till longentry5. You can add many more if you like.
The variables are all initialised as being false. This way the script can set a value to true if an entry happens.

The if function is the actual logic: You could say “if this is true” then (the line below the if function) longentry1 := (becomes) true.
In this case we have said: “if this is true” then (the line below the if function) longentry1 := (becomes) true when the current close is larger than the close that is 1 back.
The last part is the makelong_funct. This part says that if any of the entries are true, the whole function is true.

The last part of the script is the actual execution. Here the alerts are plotted and the back test strategies are opened and closed.

We hope you guys like it and all feedback is welcome!
Sürüm Notları: Added more specific comments
Sürüm Notları: Fixed a small bug in the logic and some comments..
Sürüm Notları: The script now allows for pyramid orders and when flipping the order it closes the old one.
Sürüm Notları: Small update
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu komut dosyasının yazarı açık kaynak olarak yayınladı, böylece yatırımcılar bunu anlayabilir ve doğrulayabilir. Yazara tebrikler! Ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları tarafından belirlenmektedir. Bir grafikte kullanmak için favorilerinize ekleyebilirsiniz.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?


Awesome stuff man! I really appreciate your work and that you publish this :)
Cevap Gönder
Cevap Gönder
Dragon-Bot dpanday
@dpanday, Thanks :) This script is meant to accompany our own execution bot @ https://draeon.com.
It has many features that our exclusive to our bot. Send me a message if you like more information.
Cevap Gönder
Dragon-Bot Dragon-Bot
* "It has many features ARE exclusive".. Sorry for the typo.
Cevap Gönder