Add Initial commit

This commit is contained in:
Lev
2021-06-16 17:33:44 -05:00
parent d3d84e81c3
commit 2dc386e7fd
6 changed files with 32 additions and 16 deletions

View File

@ -1,20 +1,26 @@
#include "TradingBot.h"
#include <iostream>
#include <string>
#include "main.cpp"
Bot::Bot(std::string filename)
Bot::Bot(MerkelMain _app)
{
orders = CSVReader::readCSV(filename);
Print(20);
app = _app;
}
void Bot::Print(int intLimit)
std::vector<double> Bot::linearRegresion(std::vector<OrderBookEntry> orderList, unsigned int start, unsigned int end)
{
int i = 0;
for (OrderBookEntry &entry : orders)
{
std::cout << entry.product << " " << entry.price << " " << entry.amount << std::endl;
i++;
if (i == intLimit)
break;
}
//get all dates from the order book
}
std::vector<std::string> Bot::getTimeStamps()
{
std::vector<std::string> timeStamps;
//timeStamps.push_back(app.;
//while(std::find(timeStamps.begin(), timeStamps.end(), ))
}
double Bot::getMean(std::vector<OrderBookEntry>)
{
}

View File

@ -7,11 +7,13 @@
class Bot
{
public:
Bot(std::string filename);
MerkelMain app;
Bot(MerkelMain app);
/** returns a vector with the Y, B0 and B1 values in the formula Y = B0 + B1.X */
std::vector<double> linearRegresion(std::vector<OrderBookEntry> orderList, unsigned int start, unsigned int end);
void Print(int intLimit);
private:
std::vector<OrderBookEntry> orders;
double getMean(std::vector<OrderBookEntry>);
std::vector<std::string> Bot::getTimeStamps();
};

View File

@ -6,6 +6,6 @@
int main()
{
MerkelMain app{};
Bot myBot("20200317.csv");
Bot myBot(app);
//app.init();
}

View File

@ -0,0 +1,8 @@
#include <iostream>
#include <cppunit/TestCase.h>
int main()
{
std::cout << "Hello!" << std::endl;
}