1
Follow
1
Followers
Viết một phép tính của chỉ số RSI, phạm vi quá mua và quá bán.
Trong trường hợp này, bạn có thể thấy một số trường hợp không được kích hoạt, không biết lý do tại sao.
function RSI_Signal(){
var records = exchange.GetRecords();
while(!records || records < 50){
records = exchange.GetRecords();
Sleep(Interval);
}
var rsi = TA.ATR(records,14);
var len = records.length;
if ( rsi[len-1] < rsi[len-2] && rsi[len-1] < 30 && rsi[len-2] >= 30 ){
return 1;
}
if ( rsi[len-1] > rsi[len-2] && rsi[len-1] > 70 && rsi[len-2] <= 70 ) {
return 2
}
return 0;
Related Recommendations
Advanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?5.5 Trading strategy optimization
Comment
All comments (2)
- 1
