-- Inputfields
account = InputAccountMarket('Secondary')
target = Input('Trigger percentage', 0.5)
oneWay = Input('One way', false, 'When enabled, the script will only buy on the main account and sell on the secondairy.')
maximumAmount = Input('Maximum position size', 10)
-- Obtain the price information of both markets
buyPriceA = CurrentPrice()[6]
sellPriceA = CurrentPrice(account)[7]
buyPriceB = CurrentPrice(account)[6]
sellPriceB = CurrentPrice()[7]
-- Calculate the price difference
deltaRouteA = Delta(buyPriceA, sellPriceA)
deltaRouteB = Delta(buyPriceB, sellPriceB)
-- Draw some lines
Plot(1, 'Delta A', deltaRouteA, Yellow)
if oneWay == false then
Plot(1, 'Delta B', deltaRouteB, White)
end
PlotHorizontalLine(1, 'Target', Green, target, Dotted)
-- Make sure both markets are spot
if MarketType() != SpotTrading or MarketType(account) != SpotTrading then
LogError('IEAB only works on spot accounts. One or both markets are not set on spot.')
return
end
if IsTradeAmountEnough('', buyPriceA, TradeAmount()) == false then
LogError('Trade amount is to low for the main market')
return
end
if IsTradeAmountEnough(account, buyPriceB, TradeAmount()) == false then
LogError('Trade amount is to low for the second market')
return
end
Apr 02, 23, 01:06:41 Bot deactivated
Apr 02, 23, 01:06:41 Backtest start date: 04/02/23 01:06:41 GTM+0
Apr 02, 23, 01:06:41 Backtest end date: 04/02/23 01:06:41 GTM+0
Apr 02, 23, 01:06:41 Backtest took: 00:00:01.6642358ms
Apr 02, 23, 01:06:41 ----- Custom Report -----
Apr 02, 23, 01:06:41 Estimated Profit: 0.01 BTC
Apr 02, 23, 01:06:41 ----- Backtest report BINANCE_BNB_BTC_ -----
Apr 02, 23, 01:06:41 Gross profits: 100.00000000 BNB
Apr 02, 23, 01:06:41 Fee costs: 10.00000000 BNB
Apr 02, 23, 01:06:41 Realized profits: 90.00000000 BNB
Apr 02, 23, 01:06:41 Return on investment: 10.0000 %
Apr 02, 23, 01:06:41 Price change: 0.0306%
Apr 02, 23, 01:06:41 Closed positions: 100x
Apr 02, 23, 01:06:41 Profitable positions: 60x (90.00%)
Apr 02, 23, 01:06:41 Losing positions: 40x (10.00%)
Apr 02, 23, 01:06:41 Average margin: 5.00000000 BNB
Apr 02, 23, 01:06:41 Average realized profits: 10.00000000 BNB
Apr 02, 23, 01:06:41 Executed orders: 100x
Apr 02, 23, 01:06:41 Completed order: 100x
Apr 02, 23, 01:06:41 Average open time: 10 seconds
Apr 02, 23, 01:06:41 ----- Performance report BINANCE_BNB_BTC_ -----
Apr 02, 23, 01:06:41 Max. DrawDown: 1.00% / 40.00000000 BNB
Apr 02, 23, 01:06:41 Sharpe Ratio: 1.00
Apr 02, 23, 01:06:41 Sortino Ratio: 1.00
Apr 02, 23, 01:06:41 Win %: 3.00 %
Apr 02, 23, 01:06:41 Profit Ratio: 3.00
Apr 02, 23, 01:06:41 Profit Factor: 3.00
Apr 02, 23, 01:06:41 CPC Index: 1.00
Apr 02, 23, 01:06:41 Tail Ratio: 2.00
Apr 02, 23, 01:06:41 Common Sense Ratio: 2.00
Apr 02, 23, 01:06:41 Outlier Win Ratio: 3.00
Apr 02, 23, 01:06:41 Outlier Loss Ratio: 1.00
Apr 02, 23, 01:06:41 Profit Margin Ratio: 54.00
Apr 02, 23, 01:06:41 Biggest Win: 100.00000000
Apr 02, 23, 01:06:41 Biggest Loss: -100.00000000
Apr 02, 23, 01:06:41 Highest Point in PNL: 5.00000000
Apr 02, 23, 01:06:41 Lowest Point in PNL: -5.00000000
*These numbers are for illustration only and do not reflect past or future performance.