joeldg / bowhead

PHP trading bot framework
Apache License 2.0
800 stars 288 forks source link

Test with ExampleForexStrategyCommand.php #21

Open lploumen opened 7 years ago

lploumen commented 7 years ago

Hi, First of all, I'm a not an expert in trading, just trying this library to learn some basic trading concepts. I'm trying the ExampleForexStrategyCommand.php with a 5m period on eth/usd pair. As you do in the article, I went on WhaleClub and draw the sma6 and sma40 for the 5minutes period, then run the app and check along with the chart.

My problem is that is doesn't seem to match.

The app detected only a downcross at 15:30. image

I understand the candles can be a little bit shifted as the data from bitfinex is not time stamped but can it be the problem ?

rxmg-joeldg commented 7 years ago

Are you 100% sure you are on the ETH/USD data?

That example uses BTC data and I think it is hardcoded in a couple places.

-joel

On Fri, Aug 4, 2017 at 9:47 AM, Loic Ploumen notifications@github.com wrote:

Hi, First of all, I'm a not an expert in trading, just trying this library to learn some basic trading concepts. I'm trying the ExampleForexStrategyCommand.php with a 5m period on eth/usd pair. As you do in the article, I went on WhaleClub and draw the sma6 and sma40 for the 5minutes period, then run the app and check along with the chart.

My problem is that is doesn't seem to match.

The app detected only a downcross at 15:30. [image: image] https://user-images.githubusercontent.com/11539944/28978074-e9ecaf46-7944-11e7-83d1-54051bb34d86.png

I understand the candles can be a little bit shifted as the data from bitfinex is not time stamped but can it be the problem ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joeldg/bowhead/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AOT1laEBcE_d3nwfsrLm3q8MqG25HaK0ks5sU0spgaJpZM4Ot8Y1 .

-- Joel De Gan Vice President of Technology


Mobile: (646) 724-0451 Email: joeldg@rxmg.com Skype: joel-dg

2320 Abbot Kinney Blvd, Suite A Venice, CA 90291 www.RxMG.com http://www.rxmg.com/

lploumen commented 7 years ago

Yes. I only use webfinex_eth script to get data. I also printed some data to debug :

image

Unfortunately I can't go back and have this debug line for the detected downcross at 15:30. As I wrote in my first post, couldn't it be the problem that 5 min data in database in computed from a stream without timestamp? And so the 5 min period in database is not exactly the same as from bitfinex? (Well I guess it would only offset the cross detection for a couple a minutes...).

rxmg-joeldg commented 7 years ago

It could be an issue of system time as well. I will look a little more into verifying data accuracy moving forward in the coming weeks. Been a little swamped with work and needed to take a break on bowhead.

-joel

On Fri, Aug 4, 2017 at 11:23 AM, Loic Ploumen notifications@github.com wrote:

Yes. I only use webfinex_eth script to get data. I also printed some data to debug :

[image: image] https://user-images.githubusercontent.com/11539944/28981454-2c74cb48-7952-11e7-8ec6-a93dfdd95537.png

Unfortunately I can't go back and have this debug line for the detected downcross at 15:30. As I wrote in my first post, couldn't it be the problem that 5 min data in database in computed from a stream without timestamp? And so the 5 min period in database is not exactly the same as from bitfinex? (Well I guess it would only offset the cross detection for a couple a minutes...).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/joeldg/bowhead/issues/21#issuecomment-320319978, or mute the thread https://github.com/notifications/unsubscribe-auth/AOT1lZn8HjevZoogVYmHLizpe0oWCNKNks5sU2GbgaJpZM4Ot8Y1 .

-- Joel De Gan Vice President of Technology


Mobile: (646) 724-0451 Email: joeldg@rxmg.com Skype: joel-dg

2320 Abbot Kinney Blvd, Suite A Venice, CA 90291 www.RxMG.com http://www.rxmg.com/

lploumen commented 7 years ago

OK thank you. It just detected another downcross that I cannot see on the chart :

image

Time above is UTC. +2h00 to get correct time on chart => 21:43

image