High-frequency strategy: exchange of applications for cabbage harvesters

Author: J, Created: 2017-02-16 10:12:00, Updated: 2017-02-17 02:45:00

The strategy of the cabbage harvesters:https://www.fmz.com/strategy/34388The original code:https://github.com/richox/okcoin-leeks-reaper

There are a number of exchanges abroad that offer a fee-free version of the API.

I had some problems during the test and came here to ask for help.

  1. In the original author's code, there is a one-minute delay code: sleep 60000.
  2. The transaction price code in the ported version is incorrect: self.prices[i] = trades[trades.length - 1].Price All the prices here are updated.
  3. The other thing is that I think the default parameter BurstThresholdPct is too small.

More

kongbai979What is this strategic profit logic? What is the main way to make money?

tmdsrt2 3.默认的BurstThresholdPct,实在是太小了。稍微波动一下,就相当于启动了。不知道帖主现在在跑的,有没有改小一点?

JRecently, Poloniiex's BTC/USDC trading pair is free of charge and can run at high frequency.

JFCoin 100% refunds, you can play again and continue testing the cabbage harvester! This is the first time I've seen this video.

Miracle at the Re-StorageI don't understand the second question either. https://dn-filebox.qbox.me/41bed7a69718a43b25f3715926d44361fa3d465d.jpg I'm confused at the beginning.

valennnPlease let me know if this strategy works on ok international.

Capital of the Exchange ChainFor beginners, I would also like to know the trading ideas of this program, for example: this tick volume = last tick volume * 0.7 + the actual trading volume during this tick * 0.3, for smoothing and noise reduction; this tick price = (buy 1 + sell 1) * 0.35 + (buy 2 + sell 2) * 0.10 + (buy 3 + sell 3) * 0.05; bidPrice = orderBook.bids[0].limitPrice * 0.618 + orderBook.asks[0].limitPrice * 0.382 + 0.01, etc.

sanmaoI didn't make any money with this tactic, did anyone make money?

louisIn a month, the company lost 9% and is ready to give up.

xiahaohuan001I also used the gold partition ratio of 0.618, I don't know what that means.

JShare the price handling in your ported source code // 2A. Price not breached, decreasing strength if (bull && (self.prices[self.prices.length-1] < _.max(self.prices.slice ((0, -1))) { tradeAmount *= 0.90 // price is not innovative high I'm not sure. if (bear && (self.prices[self.prices.length-1] > _.min(self.prices.slice(0, -1)))) { tradeAmount *= 0.90 // price is not innovative low I'm not sure. // 3. Short-term price fluctuations are too large and diminished if (Math.abs ((self.prices[self.prices.length-1] - self.prices[self.prices.length-2]) > burstPrice * 2) { tradeAmount * = 0.90 // 2 times the price fluctuation I'm not sure. if (Math.abs ((self.prices[self.prices.length-1] - self.prices[self.prices.length-2]) > burstPrice * 3) { tradeAmount * = 0.90 // 3 times the price fluctuation I'm not sure. if (Math.abs ((self.prices[self.prices.length-1] - self.prices[self.prices.length-2]) > burstPrice * 4) { tradeAmount * = 0.90 // 4 times the price fluctuation I'm not sure. // 4. The market price difference is too big, the intensity is reduced if (self.orderBook.Asks[0][0] - self.orderBook.Bids[0][0] > burstPrice * 2) { tradeAmount * = 0.90 // 2 times the bid price difference I'm not sure. if (self.orderBook.Asks[0][0] - self.orderBook.Bids[0][0] > burstPrice * 3) { tradeAmount * = 0.90 // 3 times the bid price difference I'm not sure. if (self.orderBook.Asks[0][0] - self.orderBook.Bids[0][0] > burstPrice * 4) { tradeAmount * = 0.90 // 4 times the bid price difference I'm not sure.

qinergThere is a question I don't understand, which bull can help me explain it. When the policy starts, two accounts are initialized. One account is Exchange and one is tradeExchange. All transactions are triggered by tradeExchange. In this case, the supporting strategy of position balancing is to check the balance of the account account and calculate the deviation of the position, but use the trade account to trade. Even if the trade is successful, should it increase or decrease the funds of the trade account?

super888// updated time price sequence // This tick price is equal to (buy 1 + sell 1) * 0.35 + (buy 2 + sell 2) * 0.10 + (buy 3 + sell 3) * 0.05 prices = prices[1.. -1] + [( (orderBook.bids[0].limitPrice + orderBook.asks[0].limitPrice) / 2 + 0.7 + This is the order book. (orderBook.bids[1].limitPrice + orderBook.asks[1].limitPrice) / 2 + 0.2 + This is a list of all the orderBook.bids that have been submitted to us. (orderBook.bids[2].limitPrice + orderBook.asks[2].limitPrice) / 2 + 0.1)] This is a list of all the different ways OrderBook.bids is credited in the database. I'm not going to be able to do this. The original author's explanation is clear (the weight sum of ==1.0), but the actual code is not clear. Is the original author's code wrong? ======================================== This is a very good post. Well, I went to github and looked it up, and it turns out that the original author changed it 10 days ago and changed the plus to a plus.

JSome of the important strategies in the original code were not ported, so I suggest adding them. // 2A. Price failure to breakthrough, decreasing momentum if (bull && prices[-1] < prices[0.. -1].max))) tradeAmount *= 0.90 if (bear && prices[-1] > prices[0.. -1].min))) tradeAmount *= 0.90 // 3. Short-term price fluctuations are too large and diminished if (Math.abs ((prices[-1] - prices[-2]) > burstPrice * 2) tradeAmount * = 0.90 if (Math.abs ((prices[-1] - prices[-2]) > burstPrice * 3) tradeAmount * = 0.90 if (Math.abs ((prices[-1] - prices[-2]) > burstPrice * 4) tradeAmount * = 0.90 // 4. The market price difference is too large, reducing the intensity if (orderBook.asks[0].limitPrice - orderBook.bids[0].limitPrice > burstPrice * 2) tradeAmount * = 0.90 if (orderBook.asks[0].limitPrice - orderBook.bids[0].limitPrice > burstPrice * 3) tradeAmount * = 0.90 If (orderBook.asks[0].limitPrice - orderBook.bids[0].limitPrice > burstPrice * 3) tradeAmount * is equal to 0.90 if (orderBook.asks[0].limitPrice - orderBook.bids[0].limitPrice > burstPrice * 4) tradeAmount * = 0.90 This is a list of all the options available for order book.

J1BTC runs this strategy, trading about 50BTC a day.

qinergdef prices = [trades[-1].price] * 15 This is also how the original author wrote the variables for initialization

qinergWell, look at the code and you'll find these problems: 1,self.prices[i] = trades[trades.length - 1].Is the value in the price array updated to the latest price? 2、self.prices.push(_N((orderBook.Bids[0].Price + orderBook.Asks[0].Price) * 0.35 where 0.35+0.1+0.05 add up to 0.5, while the original author code is 0.7+0.2+0.1

louissleep 60000 is an unpaid order that is cleaned every minute BurstThresholdPct is estimated to be a transaction volume calculated by big data. Which foreign exchanges are exempt from handling fees?

The Sheep FlyThe strategy is to ensure that the currency does not collapse, i.e. that it is always profitable without going back to zero.

The Sheep FlyIs this a tactic, please?

Arasaka Capital Arasaka CapitalHello, is it still running? I don't know if you can send me a Python version to learn. I'm from Bian, a merchant account, and I pay the bills. Q. 515051842

tmdsrt2How does it work?

tmdsrt2Fcoin transaction fees are what currency is charged and what currency is returned.

I love the fluff.The purpose may be to get another one if trades don't get it.

I love the fluff.Do you have any optimization, no money in front, more and more people behind?

JToday, the FT fell, and the yield curve fell. This strategy was originally run on BTC, and required selling the BTC held to ensure that it would not be affected by price fluctuations. I haven't found the right exchange to run this strategy yet.

swordhnjWhat if the next day the FT drops, and you have to pay the day's service fee in advance?

EvonDidn't you say before that you could still make a profit?

kouyou7035The problem of feeling should have happened on the exchange. Zaif's reputation in the Japanese forum is also particularly bad.

htccIs there a run on the real thing, or is there a profit?

JThis tactic can only be used for real disk testing, and running an analog disk on a botvs is pointless. In Japan, several major exchanges are supposed to be free of charge. I didn't get into the pattern of this strategy, I didn't know much about some of the parameters, and I gave up on the research.

jimuponIs there any research on this strategy? Did you finally make any money? Recently I learned to quantify and rewrite this strategy in Python. I found out that there is no free exchange anymore, put it on a real-time simulation of the botvs, see, the earnings basically follow the price of the currency, the balance strategy is not profitable, the trend strategy is basically unable to negotiate, it was withdrawn, probably because the trading volume on the botvs is too low?

J QQ:3171061

Following the DreamersCan you leave a contact?

The bride too.This tactic, estimated to be overkill, does not have effective stopping effects.

valennnWell, no running means no trading.

imcoddyI've been trying to win, but you said you weren't running...

valennnIt starts with a transaction, runs for ten minutes like this, and then it doesn't, and the return log is like this https://dn-filebox.qbox.me/05c78f1d854212a532ae90c3e110c6451ae99ecf.jpg

JIf you print the error message and see what the reason is. Did you say that you have a deal or no deal at all?

valennnI've tried to run before, isn't it the high frequency strategy, I don't know why running twice won't trade, is the request speed too fast and the IP blocked?

JSo, that's probably fine, but if some of the trades are just going to run out of cash, it's going to be a loss.

valennnOk, international is a taker-maker mode, no service charge.

JIt's basically a list.

valennnIs this strategy based on eating alone?

JThis is a high-frequency strategy that can only be run on a royalty-free exchange.

rajajackI'm not sure what platform you're running this strategy on, but I think it's a bit of an exaggeration, 32 times half a year!

JMy understanding is that these parameters are based on experience and are constantly being optimized according to the current stock exchange, market sector, etc.

louisCalculation of account assets

JI didn't query this. However, trade_history returns a transaction history that should be able to calculate the transaction volume compared to active_orders.

JI'm not sure what you're talking about. where active_orders returns all outstanding orders, including order number

JBitcoin can be used for transactions without the need to enter credit card numbers.

louisZaif, free of charge

xiahaohuan001How do you calculate the rent?

JThat's my misunderstanding. This high frequency is of course time sensitive, and if the delay is too great, I feel I can only raise the threshold of the first percentile. However, I have been using this strategy for half a month, adjusting a lot of parameters and not being profitable, and I have given up.

xiahaohuan001Is it possible to set the passive delay?

JI said the same thing:-)

xiahaohuan001I'm referring to passive delay, the delay of tick to trade.

JI've traded 2,000 BTC in the last few days, and I'm still not profitable.

JThe effect of the delay setting on the strategy should be very large, and the price and trading volume on which the strategy depends will vary according to the different delays.

xiahaohuan001Is the delay affecting the strategy?

louisBrother, I went in and brushed up on the 1w, but it was still empty, and this morning I saw the net worth changed to RMB or 1w, and I cried.

JI bought and sold a few times by hand, and I gave up because I didn't understand it.

HonanbtvsWhat about bitmex? Why not use this one, is there a hole?

louisHe seems to be more demanding on the amount of brushing transactions, and one of them is that the difference is too small.

JOf course, it's not that simple. But please get Zero to add these free exchanges to Botvs as soon as possible.

JTrying to verify the account, the transaction fee for the amount of brushing can also save 1% per day.

wuqianmingCan you replace the transaction function of the port policy with httpquery (())?

wuqianmingPlease tell me how to write the API.

louisI ran for a day, and it seemed like I was getting a brush, but it didn't work.

louisThe following parameter was changed, but it didn't work, and the bug was changed.

JYour trading volume increased a lot yesterday.

JSelf-written interface

3263243yThe question is, is this running on zaif? BotVS doesn't seem to have a zaif interface, how do you fix it?

jxc6698I ran a race, but I didn't win for a while, and now that I see you, I have confidence.

JGoogle's verification code, maybe it was blocked? This is a list of all the different ways Dn-filebox.qbox.me/c40a79c3e00ca877ee495df19a9f79d283da2b0e is credited in the database.

qinergZaif always prompts "reCAPTCHA please check" every time you log in, but there's no place to enter a verification code at all on the interface? How did you log in?

louisSeeing this makes me feel confident.

JHe alone is trading nearly 1,000 BTC a day, and all the cabbage is being cut by him.

JI'm starting to make money. This is a list of all the different ways Dn-filebox.qbox.me/a5bbb7f57ab71363eab3e48d864a13e70971c121.png is credited in the database.

louisThe result of such high volatility today is no money. I may have used a fake code.

louisThe secret society FUFUFU has a perfect record of transactions.

JQuoine can't go deep, or not go. Zaif's trading volumes are listed at https://zaif.jp/public_trade_user/btc_jpy/1.

louisI'm still planning to go to Quoine, but I can't get certified... Is life a folding thing? I don't make any money either, I feel like I'm brushing up on the transaction volume, and it seems that Zaif has a transaction return, but no Japanese phone verification. How many transactions are there?

JI also switched to Zaif and it worked better than Quoine. The volume of transactions was quite high, it was on the second page of the ranking in less than two days, but it didn't make any money.

JI think it's to get the best buy and sell price possible. 0.5 is fine, but the gold split rate can be used to buy and sell at a different price.

JIt makes sense!

louisI can reduce the subsequent calculation by adding a judgment tradeAmount >= 0.1 to each if.

JQuoine, I don't have any money either, but the profit is calculated in terms of money, and I ran for two days without a penny.

JI can't

louisI'm running in zaif, a very strange market, paying 5 yen a unit...

louisOne account, two API interfaces, that's my understanding.

louisI'm probably running 1BTC too, and I'm dead-set on the logs, summing up the core idea as you said above. But, two days of running, no worries, bitter laughing... I doubt it's my own transplant, what's the effect of those two days of running?

JOne of the ideas of the strategy is to hold 50% of the position, so that after buying and selling, you keep returning to the 50% position with orders of 0.01. Of course, if the price continues to rise or fall, it will also buy and sell through the trend. This strategy should work with 1 BTC, less is hard to see the effect.

wuqianmingWhat if the botvs don't support the quoin?

louisHe is not aware of the trend strategy, often the trend part is just bought and the balance strategy starts to sell.

jxc6698Well, I think this strategy is only for takers. Without depth, it shouldn't work very well.

JYes, there's an initial value at 1, and then the data is updated with shift and push.

JQuoine.com: The depth is not good

jxc6698What platforms did you test on?

jxc6698It turns out it's three threads, I said I've been weird.

jxc6698Your 1. Let the row in the loop be the leftmost row of the array.

JYesterday, I ran a day and found that this balancing strategy was basically unprofitable, now we'll see if trend trading is profitable.

JSo this initialization variable is fine.

louisSo we have a negative 2 over here.

louisThere are three threads in the source code, the main thread does trend trading, one thread does balancing strategy, and one thread does clearing.

JOh, those processes were running in sync. Javascript doesn't seem to be able to do that, it just judges the time of the order. BurstThresholdPct is used in the strategy to judge whether a price breakout in the direction is occurring, and such a small ratio feels inappropriate. The statistics of the free exchange can be found here: https://coinmarketcap.com/exchanges/volume/24-hour/no-fees/