(How to) How to write a Share Trading Bot in C or C++
How to write a Share Trading Bot in C or C++
To enter the Ongoing Programming Challenge #2 you just have to supply a single source code file called bot.c or bot.cpp. The rest of this article describes how to write it.
When you email it in, I will assign you a number and email you that number back. If in future weeks you alter your bot and resubmit it, then when resending, please send the file with your entry number appended like bot5.c or bot12.cpp - that is your bot's "Shirt Number" in soccer or football parlance! You can give your bot a name, up to 20 characters; just alter the text in the BotNameVersionDate() function, but please keep names clean. Naughty or bad names will be disqualified before they get a chance to show what they're made of.
You must download this file- cbot.zip which contains bot.h and both bot.c. These have been set up to make life easier for you. A bot.cpp will be forthcoming. You can see an explanation of how the bot.c works.
There are 3 functions that you need to flesh out. The first two (BotNameVersionDate() and BotOwner() )are purely for reporting purposes. It's the third one GetTrades() that needs all the work.[..] Read more..
Courtesy : cplus.about.com
- guru's blog
- Login or register to post comments

