Ich habe jemanden gesucht, der eine Alarm-Push-Strategie geschrieben hat, und die Rückmeldung war, dass kein Signal gesendet wurde, und die Festplatte hat einen Fehler angezeigt.
Period_list = [PERIOD_D1,12*60*60,6*60*60, 4*60*60,3*60*60,PERIOD_H1,45*60, PERIOD_M30, PERIOD_M15, PERIOD_M5, PERIOD_M1];// Liste der Minutenzeilen lastTime=0; var malevel0 = new Array(); // definiert ein malevel0 Wörterbuch[symbol]=0; function OnBar(record,symbol) { if (record==null) return; var len=record.length-1; if(len<200) return;
var ma200=TA.MA(record,ma_len)
var cci = talib.CCI(record, cci_len)
if(record[len].Open<ma200[len])
malevel0[symbol]=1;
var con=(malevel0[symbol]==1) && record[len].Open>ma200[len] && cci[len]>cci_value
//Log("con",malevel0[symbol]l,malevel0,record[len].Open,ma200[len],cci[len],record[len-1].Open,ma200[len-1]);
if(con)
{
malevel0[symbol]=0;
str = _D(record[record.length - 1].Time);//把 此刻的 毫秒时间 转换成 字符串(能看懂的)
Log("条件提示["+symbol+str+"]推送微信@" ); //输出一条信息 并推送微信
}
} /* Funktion profit_order () / Stop { prices=get_last_price() if(prices==null) return; Wenn die Position direkt überprüft wird, wird die Position direkt überprüft. { if( prices[0]-stop_price>profit_perent*stop_price/100) { Log (((“Mehr Schnörkel”,prices[0],stop_price); ClosePosition(prices[0]); reset(); } Das ist die einzige Möglichkeit, die wir haben. { if( stop_price-prices[1] >profit_perent*stop_price/100) { Log ((“Leerstand”, Prices)[1],stop_price); ClosePosition(prices[1]); reset(); } }
} */
// Haupthandelslogik
function OnTick(symbol)
{
//exchange.SetContractType(“swap”);
record = exchange.GetRecords(Period_list[period]);
if(record==null)
return;
if (record[record.length - 1].Time != lastTime) {
“Neue K-Linien erzeugt”, symbol, record[record.length - 1].Time);
lastTime = record[record.length - 1].Time; // LastTime muss aktualisiert werden, das ist wichtig.
OnBar ((record,symbol);// Schlusskursmodus
}
}
// Plattform basiert auf Tick-Level function main() { falg=1; var contract_list=[“BTC_USDT”,“ETH_USDT”] for(var i=0; i } } }