cryptrololo

Strategy JMA(7,50,RSI) crossing RSI(14,close)

Hello, i would like to submit a script dealing with Jurik Moving Average Crossing RSI . Also to avoid false positive, i made a test with long/short positions and entry/closing prices but unfortunately it's not working. I may be too noob to Pine.

If you have some ideas to refactor / improve / make this section works:
// ======= DEBUGGGGGGGG ============
long_price = 0.0
short_price = 0.0

if(startTime and endTime)
if(goLong())
long_price := close
strategy.entry("Buy", strategy.long, when = goLong())
strategy.close("Buy", when = killLong() and close > long_price)

// Shorting if using
goShort() => killLong()
killShort() => goLong()

if(startTime and endTime)
if(goShort())
short_price := close
strategy.entry("Sell", strategy.short, when = goShort() and close < short_price)
strategy.close("Sell", when = killShort())
// =========================

Thanks,

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?