Pages:
Author

Topic: ATP [Advanced Trading Platform] (Read 20914 times)

hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
November 15, 2013, 06:43:09 PM
When I started I used the most simple logic I could think of. A bit of logic that would duplicate my hand trading methodology. Something that if it was done all day every day should have no trouble making money. Except I am a human. I can notice things not being right or things going badly fast and correct my mistake. I gave the bot no such abilities because I couldn't figure out how.

I started Ask VWAP_Up, Bid VWAP_Down, Ticker length 65 minutes, polling interval 15 seconds, initially I tried 5 seconds. I really wanted it to trade anytime it could make money. Max weight was 28 (later changed to 26) minimum was initially 0.01 maximum was at 0.1. Minimums changed bitcoin wise to .02 and .0118 Local was initially wrong at 5 max and 0.01 min I changed it to 15 max and 0.01 min. I didn't use anything else.

The problem with any adjustments are they all made it harder to buy back. As an example min bitcoin over 0.01 means local not only can get as high as 15$ worth but it has to buy what ever minimum bitcoin you set as well. I did notice that limiting weight didn't help me a lot.

My mistake was thinking that the bot would try for the best price not just a price that meets my logic. I also had initially thought maybe the first sell would be wrong but subsequent sells would be much more profitable. The problem was that by design you should try to make the lions share of money off the first trade. This led to first dropping the weight so that it wouldn't trade so easily. That much worked. The downside was it didn't slow the selling appreciably just the buying. Again not what I wanted. Eventually I put the weight back up (max loss) and started tinkering with the min bitcoin that seemed like it had potential. It did actually help some. Trades slightly higher into the curve but while watching the bot I noticed it missed a ton of oppertunities.

I added several things one at a time to try to encourage it to not sell right when VWAP_Up was true. To get it a little offset. All it needed was just enough above that it would more then pay for the fees one way and I would be set.

So I tried SMA. It uses an adjustable short. No adjustment on the long but I tried making it work. The problem was that it had a really solid long term average and try as I might I couldnt' get it to try to call a bottom. This was a mistake. It only went down at average price. I tried using it for direction. SMA_Down was added to my ask logic. In theory it would keep me from selling too early. I set the short to the default from way back and noticed it still sold me super early into an uptrend. The problem? Simple the SMA hadn't yet moved to up by the time VWAP_Up was true. This was befuddling to me. But the Logic was correct for selling. So I shortened the Short MA value. I believe the lowest I tried was 2. It would still play jump rope around the average.

I tried EMA. It didn't really work any different. The price for Long Average was different but the effect was the same.

Next I got to thinking that since VWAP and SMA and EMA never seemed to have the same value that I could cobble them together and make what I wanted happen. So Ask was VWAP_Up SMA_Up EMA_UP, Bid was VWAP_Down SMA_Down EMA_Down. This provided an offset. It really did make a range where the bot wouldn't trade. Sometimes this was 2 dollars sometimes only 1. I needed about 3. All short averages where set to 2 and changed to 1. Testing led to failure.

Next I tried MACD as it seemed to have the most configureable averages. I could finally set a long average. I used the 10/21 from goomboos journal with 9 for the signal line. I couldn't find a really good set of instructions on how to use it correctly so for a while I used conflicting logic and watched the values. I finally Used MACD_Positive and MACD_Up for bid and MACD_Negative and MACD_Down for ask. Now it should sell something everytime it figures the market heads down. It did. And It should buy back when the singal says the market is heading back up. It didn't. It would eventually buy. The problem was watching the prices on QT-Bitcoin trader I would sell and by for nearly the same price. Even at 0 fee I wouldn't make money on that strategy. Some trades are far worse but on longer downturns I got usually parity or close enough to it that it wouldn't average any profits. I tried max risk and 1 for max loss. Still delayed buying ate most of my profits. Compounding my frustration was that it now traded a lot in a flat market.

This led me back to thinking about my initial problems. Initially by the time a buy did happen the market had moved up so much I would lose money. Looking at the buys and sells I had a thought. Reverse those numbers and I would stop the bleeding on the way up and sell at a much more profitable price later. The Trouble with Ask VWAP_Down and Bid VWAP_Up is that it will still have trouble buying whent he logic dictates it should. This system took advantage of the VWAP moving around a bit at lower lengths like 60-90 minutes to try to curb errant trades and I could use risk 3 and max loss of 1. It would still not stop me out when the logic dictated. I noticed it was by design looking through the code files. While there I noticed weight was effectively controlled by ADS or at least most of weights calcs are from values used to figure out ADS.

This led me to my next plan VWAP_Down and ADS_Down for Ask and VWAP_Up and ADS_Up for buying. I could watch why it wouldn't buy but I couldn't fix it. It really wasn't an improvement from VWAP up and down. I got to thinking and overly complicated this by trying to make a 4 quadrant trading system (I don't think that is the right term) I needed up a bit going up a lot down a bit and down a lot. So I had ask logic of VWAP_Up and ADS_Down also I had VWAP_Down and ADS_Down. For bid I used the opposite. VWAP_Down and ADS_Up also VWAP_Up and ADS_Up. Well not entirely the opposite. My hope had been that when ADS swapped it would sell and ride the trend down until ADS switched up. It didn't work. I also found logical nots. I traded VWAP_down and ADS_Down to VWAP_Up and !ADS_Up so if flat it could try to sell making an earlier sell. I did the same on bid for VWAP_Down ADS_up to VWAP_Down !ADS_Up. It wasn't an improvement either. I scrapped trying to get a better by and sell price. They didn't work reliably for me. More often then not the market went back to up up.

I have tried another setup over night and it provided no trades at all.... So far so good. It missed a ~20 dollar swing entirely. The upside is it didn't lose anything either. I may work on this one as see why... I may have something to post later with a victory. Personally if it works the more the merrier on it. Seriously it wouldn't make anything but pump and dumps expensive.

Using other indicators to shoe horn in trades was an epic failure for me. I really didn't likely understand how to set the weights etc to make money but there really isn't a guide I could find on what value changed what.

I know that testing would save money but the testing mode is infuriatingly devoid of helpful information. I would have to manually figure out each trade in theory what it should have gotten or sold figure in the fees etc. I'm not sure why the sim mode doesn't keep a book of what it simulated it did. It was fairly worthless as it didn't even keep track of what balances it should have so I would have to track each currency and make sure it could have paid for what it bid on. Also it doesn't account for delay in processing or transfer or slippage. Still logic that loses 12% in a day could be spotted quickly and abandoned with no losses.

If someone sees some tuning I missed on say VWAP could you let me know.
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
November 15, 2013, 01:43:22 AM
Another that may have partially led to the losses. I can't say it caused them but may have contributed at any rate. Again its MTGoXes ticker. Indirectly it how ATP handles low data. Sadly there is no way to keep enough data on some tickers to maintain trading. Now after it makes a sell I would hope that maybe it would maintain some monitoring. Again I want it to buy me out when the trend changes. I'm not sure how JPY suddenly hit 45 ticks then in 5 minutes dropped below 40. I had minimum set to 40 to keep GBP, JPY, CAD, and AUD from trading as they lack enough info reliably to get me in and out. Sadly when JPY was at 45 EUR was down to 35.... Some days you just can't win.

Possibly another idea to help make it a bit more reliable would be to prioritize currency pairs with more data or more recent data. Now I can't guarantee that it would make more money if it traded the longer and more reliable ticker only using shorter tickers after the best are used.

EDIT: Replied to PM with PM.
legendary
Activity: 965
Merit: 1000
November 14, 2013, 08:51:17 PM
I wrote you a PM. Just want to show you a screenshot and hear your opinion.
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
November 14, 2013, 08:29:10 PM
If you make money in a market, that goes down, then it might help to just stop the bot when the market goes up? Just buy and hold? Smiley

I don't know the ATP sources, so I don't really understand your problem. In my concept, a strategy is just a list of rules. The buy and sell rule don't have to be coupled in any way. You could buy when EMA cross but then sell via arb or whatever (once the sources are complete).
Well that is the idea. I made several mistakes. One was just letting the bot run I guess. See when I watch it I can usually fix small things.

The down side is that by default ATP is setup to even out the market and make money doing it. It sells based on a weight calculated by the buying pressure. The more people that buy the Larger the Sell.

Similarly buying is reversed. As the market goes down you buy bitcoins back with the amount increasing with selling pressure.

My newest test doesn't work so well either. It isn't like it wont sell. It will. As soon as the values are true. But it wont buy it back as soon as the values are true. Not enough selling pressure as it heads up.

Apparently enough people buy as it goes down that I can still sell. Just as it rockets up I can't find enough buyers to sell. Likely the difference in value adds to the problem.

Essentially the bot works as designed. In my previous example I could have left the maximum weight very low and had a buy near the bottom. But in a fairly flat market (the three weeks before that) it would sell but never repurchase it. The amount was always below minimum. Now the issue leading up to my example I had several up 5 dollar days each one having some amount of fiat. Each sell compounds the problem. Any restarts cause an immediate clearing of the logic to avoid additional sells. So MTGoX gets  502 error and I get another sell. So I had been trying to around the days low put in a buy. I didn't have faith in the trend reversing after a few weeks of slow rising so I blew out of my losing position. After that a com issue and my script restarted the bot and from then on the story is correct basically. The trouble was two fold. One It had a sell then too small of a buy too early then no subsequent buy when the bot saw a 15% gain. All logic said it should buy except the amount was too low. Eventually it had another sell and I was hoping for a bigger buy before going up. While the bot was working MTGoX website was showing cloudflared at least to me. I couldn't fix the problem manually.

I currently use a separate API based bot that has no trending or automatic trading available really and I could in the same condition blow out of my position rather then watching losses pile up.
legendary
Activity: 965
Merit: 1000
November 14, 2013, 05:14:39 PM
If you make money in a market, that goes down, then it might help to just stop the bot when the market goes up? Just buy and hold? Smiley

I don't know the ATP sources, so I don't really understand your problem. In my concept, a strategy is just a list of rules. The buy and sell rule don't have to be coupled in any way. You could buy when EMA cross but then sell via arb or whatever (once the sources are complete).
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
November 14, 2013, 04:17:00 PM
Sadly the more I think about what went wrong the less I can think of a solution.

For example. Bot sells bitcoins too close to VWAP. Solution decrease weighting by lowering stop loss. Unintended side effect Bot has trouble getting enough weight to ever buy good price or not.

Another. Bot won't buy Calculated bitcoins on buy back are below minimum. Solution increase weight. Unintended side effect Bot sells bitcoins back way to close to VWAP.

A better solution to both issues would be separating the buy and sell requirements. For example If the bot is selling my bitcoins maybe I want a minimum sale of 0.014 (I didn't have many fractions of a bitcoin) so it waits for 0.014 to sell. The bot hits this weight easy. The problem is that on the down side (the place I normally lost the ticker for minutes) the weight never gets high enough for a 0.014 buy. It gets high enough for a 0.012 buy or a 0.01 buy. Now I wouldn't traditionally want .004 bitcoins sitting untradeable but it beats a high weight turn around and a price jump with 0.014 in.

Either separate weighting or separate minimums or both would improve my situation. In my first example I needed a sell maximum weight of 0.18 to get a reliable sell high enough I should make money. On the buy side I would need a maximum weight of 0.50 (I never went that high as the results get worse as the number went up.)

I guess what I am saying is that bots may need more tuning options. For example ATP lets you set your short moving averages but your long is whatever the ticker currently has in it. That is very hard to back test. Forward testing is likely even less reliable as the long moving average moves around for two reasons. Either the actual average should move because it has the same number of ticks but they now have different values by one leaving and one gaining or you have a differing number of ticks like it misses a 2 minute window so you miss one every 30 seconds totaling 4 ticks. Your long MA is now 4 shorter then it would be. Whats worse (you can't fix this part) is no matter what MA you use it will be somewhat altered by missing data. Having your long MA shorter then your total ticks would at least make it based on the same number of ticks.

Buy and sell logic is great it can be way different and that is a good thing. The actual amounts to buy and sell are calculated identically but the source of the weight is reversed. asks to bids. The trouble is that unless something went horribly wrong the buy logic will always try buying less. The reason? Its still based on what you have. I have reguardless of price more money generally in bitcoins. So the sell weight results in a radically different result then a similar weight would on the buy side since it is calculated off a smaller number.

Another thing that would at least save me some money would be instead of an exponential backing off system allow a minimum for bitcoins and maybe other currencies. Its unlikely that I would want to force money into a loss but someone else may want some dry powder if the market moved unexpectedly. I only point this out as it would have helped me not lose money fairly frequently. The main problem was the weighting system indirectly. Bot sells at lets say 105 because its enough above VWAP. market drops to 100. Bot buys because its below VWAP. Technically I made 3.4% in theory. Reality is somewhat different. Bot sold .03 at 105 and repurchased .01 at 100. So I have about a 1% gain currently. Now the problem. Market keeps going down. I know High Quality Problem I'm making money. So market drops down to 85. Bot sits on down for a long while. Weight is inadequate to buy again. Vwap Switches to up a few times. The last time it Sells a litte at 90 lets say .02. Now I have 0.04 with an average price of 97.50. The market heads up. This time it starts range trading at 110. I am now sitting on a loss. Market drops down a little to 108 and bot buys back .02 now I have made that loss permanent. But wait there is still .02 waiting to be bought. It can lose a virtually unlimited % as long as the market heads up. The numbers may have been off but that actually happened to me and I am fairly sure the amounts are not terribly far off.

The issue wasn't the logic. I really did want to sell high and buy low. And what it did buy or sell was at a profit in a way for the first part. The problem is that I couldn't see a way to make it reliably make good trades over the long term. If the market was range bound I could make money. Frequently did make a bit. If the market was going down it was simple to make money. When the market went up I lost a ton.
legendary
Activity: 965
Merit: 1000
November 14, 2013, 04:03:43 PM
Well, I also have a profitable bot. Profitable at a very small scale, as I have to admit. But it is making profit AFAIK.

Now I have to expand it's capabilities and it seems you have experiences in the field, that I want to explore.
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
November 14, 2013, 03:29:09 PM
Wow! It seems like you tried a lot of strategies in technical trading? I'm working to intergrate such strategies in my framework, too. Is it ok to contact you, once I got the methods integrated into my framework?

So we could discuss such strategies? Maybe come up with new ones?

You are welcome to discuss strategies with me. I would be more then happy to try helping. That having been said I would hope you would ask also for some discussion with someone like ianwhitbread who made money.
legendary
Activity: 965
Merit: 1000
November 14, 2013, 01:27:45 PM
Wow! It seems like you tried a lot of strategies in technical trading? I'm working to intergrate such strategies in my framework, too. Is it ok to contact you, once I got the methods integrated into my framework?

So we could discuss such strategies? Maybe come up with new ones?
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
November 13, 2013, 11:37:44 PM
Aido any progress on the Arbitrage code?

I am getting less and less hopeful that I can get logic to trade me out of the hole ATP manages to, because of MTGoX, trade me into.
To be honest I have tried so many pieces of logic that should work to make money.

I tried MACD, sig 9, short 10, long 21, have tried from 30 seconds to 2 hours between polls. It delays buying back my bitcoins. It will sell like there is a house fire. It just can't buy to save my cash. Buy was MACD_Positive and sell was MACD_negative. The trouble was no matter what I do I can't get the bitcoins back until its too late. I tried high and maximum risk. Max just goes stupid into every small change and bleeds me quickly at .01 per trade. High isn't better it delays so much that a 30$ swing becomes buying 3$ higher.

I tried VWAP with polling at 15s, 30s and a max tick length of 30m, 45m, 50m, 55m, 60m and 70m. Again selling my bitcoins it does great at. I used to run VWAP_Up for selling and VWAP_Down for buying. Firstly I had tons of sells. as soon as the price barely clears VWAP it sells. In theory it should eventually buy back the bitcoins. Trouble is that every tick after the sell increases the VWAP. This has two effects causing my lack of profits. 1. If the weight ever gets high enough to buy when the VWAP finally changes I generally see sell price + at least 1 dollar. 2. When the market heads up nothing happens that helps me. ATP stays all in FIAT. This upswing bleeds me the whole way up. Whats worse is that even if the trend reverses slightly short of a buy I am stuck I have a huge loss and until it buys back less then its last sell I can't get another sell that might be profitable.

That VWAP problem got me thinking Why sell VWAP up if it sells seemingly instantly when VWAP_Up = True. What would help a lot more was to sell when VWAP_Down was true (selling into the drop preferably early into it. Buy them back at least an hour later down 10+ dollars lower when VWAP_Up was true. The downside wasn't that the indicators wouldn't show up. They do. About half the time profitably at least 25% of the time quite profitably. The downside again was although it sells immediately on the VWAP_Down being true When a long time later VWAP_Up is true there is no weight. This system would fix both issues I have tried curtailing with other indicators in the past. If the market heads to the moon as the saying goes I should get bought out quickly and when the market moves down I should get a string of sells. previous testing left me assured this setup would only bleed me in a flat market and likely not a lot. Sadly what it does do is just that it bleeds me slightly in a flat market. What it doesn't do is make money in a choppy market. This is by design. Seemingly the weighting engine doesn't allow the spreads to be reversed. I get that by design this bot should using only VWAP buy down and sell up to even out the market. What I don't get is how to make it work.

Other experiments, I used EMA and SMA to give an offset around the average price making sure (I thought) that the buys and sells would be enough dollars apart to make money. I varied the short average a bit but only noticed that the larger the short got the less likely the indicator was caught up to the current trend.

I tried using MACD and VWAP it was worse then either alone.

I have tried ADS and VWAP and the 24 hour performance is lackluster for my 4 quadrant setup. I think maybe just 2 is better. This also will not buy me back out into an up market at a profit reliably. It did point out why I couldn't get any weight as the only way to see the items to calculate weight is to enable that indicator. Sadly VWAP up & down ADS down sell and VWAP up or down ADS up buy doesn't work.

I think it would work better somewhat as I have to use Max risk to buy anything back at (VWAPdown & ADS down sell) and (VWAP up and ADS up buy).

This isn't terribly helpful as because the weighting is backwards I either need a stop loss that works so when the market heads up I actually get stopped out not just get to watch my losses explode, or I need the weighting backwards so that it will sell early enough and buy way earlier.

The code change looks fairly trivial but compiling this exact setup I have never done.

Sadly a streaming ticker would have helped some. I started at .41 BTC I am down to .0341 BTC. It has beyond decimated my test money to get this far. And my only conclusion seemingly is to use everything backwards and force the trade when the indication says its time. End result enhanced losses in a flat market and maybe a gain when it goes lumpy. I guess its better then some losses in a flat market and a huge loss when it goes lumpy.

I'm sure I did many things wrong I just kept looking for something to fix the problems. If anyone has a suggestion I would appreciate it.
member
Activity: 101
Merit: 10
July 31, 2013, 04:06:39 AM
Yes my Atp

Is offline

Been stuck at 1 ticker

Been doing manual trades every 24 hours

hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
July 31, 2013, 03:45:37 AM
Aido.
Not sure if this makes sense to you but it seems like using another API program on MTGoX has improved my ticker length. Nothing on my end changed except adding an API program so I can sell if the market turns against the bot. Anyways it went from a ticker of ~200 to >420.

It could be MTGoX has improved something but 2 crashes today suggests to me that whatever they might have tried fixing it didn't take as cloudflare keeps killing ATP.

Thanks for all you do.
member
Activity: 101
Merit: 10
July 23, 2013, 04:53:06 AM
Btw any news on nova

I hope all is well and him and his car i guess he has been rescued?



hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
July 23, 2013, 04:12:47 AM
Is this result about what I should expect from MTGoX Polling interval 20 seconds, Max tick age 480 and a USD ticker size of 207 with EUR sitting at 90?
I know the obvious answer is that it hasn't been running long enough. It has been running over 24 hours continuously. That should fill an 8 hour log.

I only ask because between cloudflare and the API having Less then 50% of the expected at a 60 Second interval I am concerned. I guess MTGoX is waiting for people to leave so their server can be responsive again. If a bot that I don't have to install another browser or OS for pops up I will happily drop MTGoX just to help them out. I am still hopeful on Profits. Right now I rack up losses because any moderate volume trading time makes me lose the API for a while the longest I have witnessed was 12 minutes.

If people with better experiences would also let me know maybe if paying enough fees to bump your account up makes it better I would be really happy. I don't think they would prioritize those accounts that pay them a lot of money. I just hope no ones results are as bad as mine.
member
Activity: 101
Merit: 10
July 21, 2013, 09:28:27 PM
MAN!! missed loads on this forum

was not getting emails about the updates

oh well

anyway

seems mtgox ticker gone funny again,   i guess they did a dodgy update again
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
July 16, 2013, 02:17:28 AM
any news on adding cryptsy ?

AidoATP currently relies on the XChange library for all communications with the different exchanges. If cryptsy isn't supported by XChange then it won't be supported by AidoATP.

Cryptsy currently isn't supported by XChange
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
July 15, 2013, 11:30:51 PM
Aido
I didn't see anything in the changes to explain what I am seeing on the console.

On BTC selling calculations everything looks great.
Blah blah blah weight,
Blah amount less then minimum
BLah blah blah didn't trade

On buying bitcoins it looks wrong
Bah blah blah weight

I look in the log and I see a value of USD I have. It just never seems to calculate an amount of bitcoins to buy.

Switched back from development version with 4 options and Bam a buy on less weight then the other version. Odd

EDIT: am on strategy 2. Not sure if that helps or hinders but that is what I was on.

EDIT2: Aido I think I was wrong before about my logic being fine. I made an assumption that the max local wasn't the most ATP would calculate based on but a limit to how much it could use at once. It appears that I was a bit off in that. Either that or doubling the max had an unexpected side effect of allowing multiple buys in a row.
hero member
Activity: 532
Merit: 500
July 15, 2013, 09:03:39 PM
any news on adding cryptsy ?
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
July 15, 2013, 06:05:22 PM
New commit in develop branch (see previous post)

commit 1f3d28943ac40659de61dbb789930415a1a63977

    Added another level of risk

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
July 15, 2013, 05:26:15 PM
what I'm thinking is having 4 risk levels.

  • 1 = Low risk = current conservative risk
  • 2 = Medium risk = current high risk
  • 3 = High risk = current maximum risk
  • 4 = Maximum risk = current maximum risk with exponential reduction in trade amount disabled

This way, no change to existing users configuration as no change to risk levels 1 to 3. If someone wants to experiment with the additional risk level just edit their config and change risk level to 4.
Pages:
Jump to: