資源の読み込みに... 荷物...

シャノンの悪魔

作者: リン・ハーンフォークスパン, 日付: 2017-12-21 00:28:14
タグ:RSI


/*

 Shannon's Demon Demo Code

 Copyright 2018 FawkesPan
 Contact : i@fawkex.me / Telegram@FawkesPan

 Do What the Fuck You Want To Public License

*/


function onTick(){
    var Account = exchange.GetAccount();
    var Depth = exchange.GetDepth();
    var Buy = Depth.Asks[1].Price;
    var Sell = Depth.Bids[1].Price;
    var StockValue = Account.Stocks * Buy;
    var TotalValue = Account.Balance + StockValue;
    var Half = TotalValue / 2;
    var Records = exchange.GetRecords(PERIOD_M1);
    var RSI = TA.RSI(Records, 14);
    //Log("StockValue:", StockValue ," TotalValue:", TotalValue);
    var LastRSI = RSI[RSI.length -1];
    //Log(LastRSI);
    if (StockValue / Half > DS && LastRSI > RSIS) {
        Log("StockValue:", StockValue ," TotalValue:", TotalValue);
        Log("StockValue Too High. Re Balancing...");
        var ToBeSold = (Account.Stocks * Buy - Account.Balance) / 2 / Buy;
        Log(exchange.Sell(Buy,ToBeSold));
        Sleep(DELAY*1000*5);
    }
    if (Half / StockValue > DB && LastRSI < RSIB) {
        Log("StockValue:", StockValue ," TotalValue:", TotalValue);
        Log("StockValue Too Low. Re Balancing...");
        var ToBeBought = (Account.Balance - Account.Stocks * Buy) / 2 / Sell;
        Log(exchange.Buy(Sell,ToBeBought));
        Sleep(DELAY*1000*5);
    }
}
function main(){
    while(true){
        onTick();
        Sleep(DELAY*1000);
    }
}

関連性

もっと

dayTrader2018 について購入価格が2倍,販売価格が2倍,どう考えられるか教えて下さい.

収穫者さんRSI戦略は? 引き下げは少し大きい.

フォークスパン自動解決です.これは,単に,それを実行して,それを実行して,それを実行します.

フォークスパンRSIではなく,シャノンの悪魔です. 参照リンク https://blog.enigma.co/is-there-a-free-lunch-in-the-crypto-markets-c4aa331443f1?gi=da410865d041 RSIは,山頂で購入し,山の下で販売するときに,バランスの取れたポジションを防ぐために使用されます.