TradingView
capissimo
18 авг 2019 г., 05:59

Scaled Normalized Vector Strategy, ver.4.1 

Bitcoin / United States DollarCoinbase

Описание

This modification of the Scaled Normalized Vector Strategy uses trailing stops and is optimized for lower TFs.

Информация о релизе

Major fix accounting for changes in Pine introduced since the time this script was published.

Информация о релизе

Major fixes. Updated to PneScript version 5.

Информация о релизе

Minor fix to trail stops.

Информация о релизе

Minor fix related to trailing setup.
Комментарии
kdiddydawgy
I'm getting the following error when converting to study:
kdiddydawgy
line 39: Shadowing built-in variable 'obv'
line 39: The function 'change' should be called on each calculation for consistency. It is recommended to extract the call from the ternary operator or from the scope.
capissimo
@kdiddydawg, since this script was published Pine has received several new built-in variables and functions, and obv is one of them. Change it to obvvar, for instance.
Also, insert the following variable: changed = change(price) just before the obvvar calculation. Thx again for your support)). I updated the sxcript, though.
capissimo
To eliminate repainting it is recommended to use these lines in the getdiff function:
curr = scaleMinimax((useold ? security(syminfo.tickerid, tostring(tf), hlc3[1], barmerge.gaps_off, barmerge.lookahead_on)
: security(syminfo.tickerid, tostring(tf), hlc3[1])), tf, 0, 1)

Here hlc3 is substituted with the previous value, i.e. hlc3[1]
capissimo
@capissimo, hlc3 then the opening brackets then 1 then the closing brackets (i don't know why, but the commenting subsystem deletes the brackets))
TY19
@capissimo, Thanks a lot! I will go through the test with live data tomorrow. Pinecoders just shared the repainting issue solution with us for better understanding. tradingview.com/script/cyPWY96u-How-to-avoid-repainting-when-using-security-PineCoders-FAQ/
ElectricSavant
Why when I refresh I lose the history of the trades?

MB
TY19
@ElectricSavant, I haven't seen this before.
ElectricSavant
@TY19,

Who are you? My question is to the coder.

ES
ElectricSavant
@ElectricSavant,

This is an easy thing to replicate....just hit refresh....
ES
Ещё