Skip to content

Instantly share code, notes, and snippets.

index.js:694 should do checkGunthyWallet
charting_library.esm.js:2 [Violation] Avoid using document.write(). https://developers.google.com/web/updates/2016/08/removing-document-write
_create @ charting_library.esm.js:2
s @ charting_library.esm.js:2
(anonymous) @ index.js:1327
hi @ react-dom.production.min.js:3530
qj @ react-dom.production.min.js:4841
push.726.exports.unstable_runWithPriority @ scheduler.production.min.js:282
vf @ react-dom.production.min.js:2062
cj @ react-dom.production.min.js:4828
"quanta_exotrader": {
"ADX_ENABLED": false,
"ADX_LEVEL": 25,
"ATRX": 0.5,
"ATR_PERIOD": 14,
"BTC_MONEY_FLOW": 35,
"BF_SINCE": 0,
"BF_UNTIL": 0,
"DEEP_TESTING": false,
"BTC_PND_PERIOD": 14,
function checkLastBuyOrderInCurrentCandle(orders, candles) {
const lastBuyOrder = orders.find(order => order.type === "buy");
if (!lastBuyOrder) {
return { allowNewBuyOrders: true, reason: "No buy orders found" };
}
const currentCandle = candles.close[candles.close.length - 1];
if (!currentCandle) {
function calculateReturnOnBot(orders) {
// Sort orders by time to ensure chronological order
orders.sort((a, b) => a.time - b.time);
// Initialize variables
let positionSize = 0; // Total units held
let capitalUtilized = 0; // Capital tied up in open positions
let totalNetProfit = 0; // Sum of realized PnL
let totalWeightedCapitalUtilized = 0; // Sum of (Capital Utilized * Duration)
let totalDuration = 0; // Total time in milliseconds
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>ChatGPT Screenshot Recreation</title>
<style>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
"pairs": {
"bybit": {
"USDT-1000PEPE-LONG": {
"strategy": "hedge",
"enabled": true,
"override": {
"USE_TREND": false,
"BUY_ENABLED": true,
"SELL_ENABLED": true,
"FIRST_TRADES_MULTIPLIER": "1",
"pairs": {
"binance": {
"USDT-BTC": {
"strategy": "builder",
"enabled": true,
"override": {
"BUY_ENABLED": false,
"BUY_METHOD": "futbit",
"SELL_METHOD": "futbit",
"BUY_LEVEL": "1",
"pairs": {
"huobi": {
"USDT-BTC": {
"strategy": "builder",
"enabled": true,
"override": {
"BUY_ENABLED": true,
"BUY_METHOD": "futbit",
"SELL_METHOD": "futbit",
"BUY_LEVEL": "1",
"pairs": {
"bybit": {
"USDT-BTC": {
"strategy": "builder",
"enabled": true,
"override": {
"BUY_ENABLED": true,
"BUY_METHOD": "futbit",
"SELL_METHOD": "futbit",
"BUY_LEVEL": "1",
createTVSellOrder(symbol = undefined, volume, price) {
return new Promise((resolve, reject) => {
exchange.createOrder(this.formatCurrencyPair(symbol), "market", "sell", volume, null, price).then(data => {
return resolve(data);
})
.catch(e => {
console.log(JSON.stringify(e.message))
return reject("Issue creating sellTV order:" + JSON.stringify(e.message));
});
}).catch(e => {