Back

Crypto Buy-Dip, Price Percentage Delta- Top 1% of Community.

As of this writing this algo is ranked #1 and is in the top 1% of the community.

It's a crypto algo. GDAX charges high fees for 'takers', and there is no fee modelling. It will have to be appropriately converted to limit orders in order to take advantage of GDAX's zero fee for 'makers' fee model in order to actually be useful. Slippage is low on GDAX for the instruments in question so that shouldn't have too much of an impact.

Update Backtest








0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


John Schwartz not at the moment sorry you'd need to restart the algorithm.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi,

Is there a way to use the GDAX sandbox through the live feed to test these algos is a "real-world" type scenario.  Does that paper trading mimick the actual GDAX sandbox, or just the data? Would be interestiing to see if there is a true diff between Papertading and a real GDAX trades. Possiblyu there a way to define it in the algo in AddCrypto to Market.GDAXxxxx

0

I've been live-trading on GDAX this week (not this particular algo) and in a few days I'm planning to go back and backtest the period for which I have live trading data, and do some analysis of the differences between backtest outcome and live outcome for the same algo/time period.

0

Nate I'm trying some live trading as well and it buys and sells fine then when it goes to buy a second time i get this in my log 

Order Error: id: 3, Insufficient buying power to complete order (Value:480.4305), Reason: Your portfolio holds 495.28625069331565 USD, 471.84720936 USD of which are reserved for open orders, but your Buy order is for 2.9768293 LTC. Your order requires a total value of 480.906773415 USD, but only a total value of 23.43904133331565 USD is available.

do you know what this is about? or how i would go about coding after it sells to wait like 30 seconds before buying again,  
0

Hi Samuel. Jared describes how to wait above. You can try that and see if it works.

0

Sam, the buy order is being submitted before the sell order has filled. Personally, I find the SetHoldings() and Liquidate() methods pretty limiting and use a complex framework of classes for trade execution.   I'm not sure what the easiest fix would be if you're using an algo similar to the above... If you use the MarketOrder/LimitOrder etc. methods instead of SetHoldings and Liquidate, then you can set a flag to make the orders synchronous, which means subsequent code doesn't proceed until the order fills.

0

Warren, I have tried the Transactions.MarketOrderFillTimeout = TimeSpan.FromSeconds(30);. Seems to do the same thing. I beleive what Nate is saying is the cause. I have to say I'm so new to this its quite diffucult lol. I'm using limit orders to try and keep fees lower on GDAX. Warren if you or Nate would be willing to help me on this or give me a few tricks to help. I would be hapy to compensate you for your time!

0

If you're using LimitOrders, then you can't really assume the order will be filled in any set amount of time; hypothetically, it could never fill.  So you'll want to add logic to either check the status of the submitted order, or check your current holdings using the Portfolio class.

0

For the updated Samuel's algo, in live GDAX, I did put this line of code as suggested for c#: Transactions.MarketOrderFillTimeout = TimeSpan.FromSeconds(45);

There were 3 transactions:

1.) Buy BTC : successfull 

2.a) 1hr later

a) Sell BTC :sucessfull

b.) Buy ETH - failed.  I was short by $0.0000369

I think another trade will occur in about a hour or 2, but the subsequnt sell then buy will have another error. The paper trading flows fine.

Is there a recommendation to calculate the trade quanity based on the shortened dollar amount for the trade to 2 decimals e.g. $321.12 instead of the 9 decimals. or only buy based on 99 or 98% of the cash.

0

Sorry did not see the 2 prior messages before my last one: Do I have to be concerned with the time in the log: At 11AM CST, the Event Time shows 3PM.  

Nate -  The order for sell is filled, and then the next buy is shown in the log.  It's just that the amount is less by few micro cents, that fails the order.

I think since the failure is due to a very small amount, if the next buy is set to 99% cash after the sale may help.  Issue is how to do a write that up in the code - noob here.

0

Thushara does your log say X amount of cash is reserved for open orders?

1

Samuel, it says "... 0 USD of which are reserved for open orders, ..." It says my portfoliio holds more than than needed.

E.g. The on the log states the portfolo has $1007.50, order needs $1000.123456789, but after the last sale, only $1000.123412345 is available.  The order is short by approx $0.00044.  

Order Error: id: 3, Insufficient buying power to complete order (Value:123.3949), Reason: Your portfolio holds 124.7492390002313 USD, 0 USD of which are reserved for open orders, but your Buy order is for x.81501615 ETH. Your order requires a total value of 123.394903944 USD, but only a total value of 123.3948670848 USD is available.  : 123 are masked numbers, but decimals are accurate

0

You can just set the leverage equal to 0.99.

1

mmm Thushara seems we are having similar problems, but mine says I have a certain amount reserved for open orders. Are you using limit orders? If you are trading live on GDAX it could be because of the fees that its given you that error. I have mine set for limit orders but I keep a certain % of my portfolio in cash for rounding limit orders and fees. I belive my problem is with the asynchronous call. Its buying then selling but then trying to buy again before the sell order is filled, Im very new to this as well and I am trying to figure out how and where to code this time hold. Id like it to sell then wait a minute or so before moving on to the next line of code to buy, but i am struggling in figuring out to do so.

0

Make sure you set the BrokerageModel property. Without it you have the potential to sell coins before you own them (short) or buy without the cash available for the trade. With the cash model we enforce that you own the coins/USD before placing the trade.

If executing through a brokerage with leverage its not a critical issue. There is just such a lot of volatility at the moment weird fills happen which might look unrealistic -- e.g. imagine a 1-minute bar of OHLC (150, 160, 140, 150). Imagine you had 2 limit orders for 159-Sell and 141-Buy. We'll model these limit orders as both filled within the 1 minute bar as long as you have the purchasing power at the time making it appear like an instant profit.

SetBrokerageModel(BrokerageName.GDAX)

You should also probably assume you can only fill $1,000 or less at any of the bid/ask prices. Its fairly shallow at the top of the book at the moment in crypto. It might be more realistic to use a slow-fill model which fills over many bars.

1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


What is this strategy doing exactly? It's just buying the dip and holding? Or I guess buying with an EMA cross?

0

nevermind this site was glitching and I couldn't read the prior comments haha

0

Samuel - I'm using the algo where you chnaged the emaOfChanges1Length =5.. I've put in the leverage=0.998m and the orders seem to work, it had gone through on the 3rd order without failing.

Jared, when I used "SetBrokerageModel(BrokerageName.GDAX)" in the past,, not sure of the eact verbiage, but I was getting an error that margin trading was not allowed and would error out.  Once I commented out that line, it would work as long as I defined it in the "AddCrypto(.....)".  

0

Alright so anybody figure out the backtesting on this? I'm sorry but these numbers seem utterly unrealistic, $1,000 to $7,500,000 in 2 months lol, market orders, something must be going on with the ordering. 

Change the settings for ema variables to 1 

$1,000 to $250,000,000M lmao yeah right...

0

Samuel - are you live trading? I have the limit orders running on paper trades with no issues; also have same algo from live trading on paper too.  So I can do some verification/analysis on them.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed