rthomson

BitMex Trailing Stop Strategy

צפיות ‎2727‎
139
2727 9
This script is designed for those who want to use BitMex's trailing stop. It's not meant to be used as entry exits, but rather to get an idea of how wide the trailing stop needs to be. I suggest you backtest with different values. The script can also be integrated into an existing strategy which does give entry/exits to act as its stop loss.
הסר מסקריפטים מועדפים הוסף לסקריפטים מועדפים
Can you explain how to put this to backtest further back in time- when I load it, it only shows trailing for the last 2 weeks?
+1 השב
rthomson ippp0031
@ippp0031, unfortunately the way it is coded is based on the 1 minute chart which seems to have a limit on TV about how far back it will pull that in, so its limited in this regard.
השב
ippp0031 rthomson
@rthomson, Okay, what would I need to change to base it off another timeframe? I trade mainly on 1 to 9 hours.
השב
ippp0031 rthomson
@rthomson, Is it tickerID? I just change the number in that?
השב
rthomson ippp0031
@ippp0031, the problem is that an actual BItMex trailing stop isn't based on a close of a higher candle but on the live price reaching that value. Suppose a 1hr candle gives a low of 6200 but closed at 6300, a trailing stop at 6250 would be stopped out. But an indicator based on 4hr candle close wouldn't register that as stopped out, therefore not reflecting an actual BitMex trailing stop.
+2 השב
ippp0031 rthomson
@rthomson, Okay. I see what you're saying, but need to process that in my head. I've modified it and playing around with it. I'm also thinking of using the modified version as manual entry or using Autoview to enter/exit, and I can also set the ts myself. I've changed tickerID to 60 and it does go further back in time. As a compromise, I may test setting it to say 5, 10 etc. As it happens it makes good calls in general for entry/exit when set to 60 and trailing set to 120ish for long and short I've noticed.
השב
rthomson ippp0031
@ippp0031, it wasn't really designed as an entry exit strategy, but to help refine one's trailing stop only. Since then I found ATR Trailing Stop better and manually adjusting it.
השב
ippp0031 rthomson
@rthomson, The results look pretty decent actually, am gonna test it and let you know how it goes. I published an edit of a supertrend ATR script myself, its on my page. What's the ATR Trailing Stop you're using, did you publish it or is it by someone else?
השב
rthomson ippp0031
@ippp0031, I published it, it is a pair with my Position Size Calculator based on it. I am currently working on a new version too. You will find them on my page as the most recent scripts I think.
השב
בית סורק מניות סורק מט"ח סורק מטבעות-קריפטו יומן כלכלי איך זה עובד‏ תכונות גרף מחירון הפנה חבר חוקי הבית מרכז תמיכה כלים לאתרים וברוקרים יישומונים פתרונות גרפיים ספריית גרפים קלי משקל בלוג וחדשות טוויטר‏
פרופיל הגדרות פרופיל חשבון וחיוב הפנה חבר לשוניות התמיכה שלי מרכז תמיכה רעיונות שפורסמו עוקבים עוקב אחרי... הודעות פרטיות צ'אט התנתק