Quantcast

Jump to content


Photo

Ideal Stock-market Buy/Sell Points

python bot stockmarket auto-buyer/seller

  • Please log in to reply
23 replies to this topic

#1 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 05:53 AM

Hey Everyone! :D

So i'm currently writing a Stock-Market Auto Buyer/Seller and i was wondering what everyone's ideal points of buying and selling are

so i have the buying set at 15 NP per share but I wasn't sure about the selling point I have it set at 30 but i think that's too low and people want more profit

so if you guys could tell me what point you would sell your shares at that would be awesome!

Bot coming soon!! :yahoo: :nana:

EDIT
Download bot here:


http://www.neocodex....ller/?p=1684545

Edited by ChristianCareaga, 31 July 2013 - 05:58 PM.


#2 Waser Lave

Waser Lave

  • 25516 posts


Users Awards

Posted 31 July 2013 - 05:57 AM

You can see charts of the history of stock prices here:

 

http://www.neodaq.co...s/thumbnail.php

 

60 tends to be a pretty reliable selling point.



#3 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 05:59 AM

You can see charts of the history of stock prices here:

 

http://www.neodaq.co...s/thumbnail.php

 

60 tends to be a pretty reliable selling point.

Oh wow that's really helpful!



#4 Waser Lave

Waser Lave

  • 25516 posts


Users Awards

Posted 31 July 2013 - 06:11 AM

It should be a decent starter program since you'll be able to practice internet programming, string manipulation and basic logic. You can then use the same skills in more useful programs like questers or autobuyers etc. ;)



#5 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:13 AM

I buy at 15 sell at 400%

 

If you are writing a program to do this, you should make the variables customizable.

 

I run it every hour on the x:02 and x:32

 

What languages are you using? If you use python i can assist you a little easier, but let me know.

 

I fully support this idea, Waser is right... This is how you properly learn how-to program :p



#6 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:17 AM

I buy at 15 sell at 400%

 

If you are writing a program to do this, you should make the variables customizable.

 

I run it every hour on the x:02 and x:32

 

What languages are you using? If you use python i can assist you a little easier, but let me know.

 

I fully support this idea, Waser is right... This is how you properly learn how-to program :p

 

Yup Im writing it in python and its mostly done

 

your right i should make it customizable

 

since its in the task scheduler i cant get the custom settings from the main program so i was thinking of using the .txt that the UN and PW are stored in and you can put in your own buy and sell points 

 

or i could write a side prog that prompts for those then writes them to the file 



#7 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:22 AM

I would just store the settings within a .py file and import it... something like...
 
settings.py:
 
class Config:
  my_psw = <see below>
 
main.py:
 
from settings import Config
 
# Now you can access Config from settings.py
 
When im writing a program for myself and have to put in my password, sometimes i do something like this in the console:
 
 
>>> import base64
>>> my_psw = "password1"
>>> b64_psw = base64.b64encode(my_psw)
>>> b64_psw
'cGFzc3dvcmQx'
>>> my_psw_frb64 = base64.b64decode("cGFzc3dvcmQx")
>>> my_psw_frb64
'password1'
So then you can do something like this:
>>> class Config:
...   my_psw = base64.b64decode("cGFzc3dvcmQx")
... 
>>> Config.my_psw
'password1'
>>>
This is not the best way of doing things, but its good for starting out. It prevents people from looking over your shoulder at the code and seeing your password. Or having password sniffers find it... etc... Just one level of obscurity...

#8 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:25 AM

 

I would just store the settings within a .py file and import it... something like...

 

settings.py:

class Config:
  my_psw = <see below>

main.py:

from settings import Config
 
# Now you can access Config from settings.py

When im writing a program for myself and have to put in my password, sometimes i do something like this in the console:

>>> import base64
>>> my_psw = "password1"
>>> b64_psw = base64.b64encode(my_psw)
>>> b64_psw
'cGFzc3dvcmQx'
>>> my_psw_frb64 = base64.b64decode("cGFzc3dvcmQx")
>>> my_psw_frb64
'password1'

Oh thats a good idea 

 

Yeah i will definetly make the setting customizable and like i said the prog is pretty much done i was just wondering about the  buy/sell points 

 

so ill make it custom then ill py2exe it (having trouble with that part)



#9 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:27 AM

py2exe can still be decompiled; just be warry of that.

#10 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:30 AM

py2exe can still be decompiled; just be warry of that.

well i cant get it to work :(  i run the setup.py and it throws an error than i run it again and it creates the .exe but i get random errors when i run it i was gona have a friend do it for me but he cant right now


Edited by ChristianCareaga, 31 July 2013 - 06:30 AM.


#11 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:31 AM

Your starting to program :p Learn to use more descriptive terms than "Random Erorrs" that is how program users talk :p Code samples are also a great way to go xD

#12 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:34 AM

Your starting to program :p Learn to use more descriptive terms than "Random Erorrs" that is how program users talk :p Code samples are also a great way to go xD

well not random i get errors from my code even though i know  the code works in .py form then i change the code and re-compile and i just get a different error 

 

I cant figure out why it isnt compiling in one try 



#13 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:39 AM

"I cant figure out why it isnt compiling in one try"
Your not providing us any examples to help you with :p Try posting some code, maybe your setup.py xD :p

#14 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:42 AM

"I cant figure out why it isnt compiling in one try"
Your not providing us any examples to help you with :p Try posting some code, maybe your setup.py xD :p

here is the setup.py 

 

from distutils.core import setup
import py2exe, sys, os


sys.argv.append('py2exe')


setup(
    options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
    windows = [{'script': "stockbuyer.py"}],
    zipfile = None,
)

and when i run it i get this Traceback after a couple hundred lines:

 

Traceback (most recent call last):
  File "C:\Python27\Stocks\setup.py", line 9, in <module>
    zipfile = None,
  File "c:\python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "c:\python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\python27\lib\site-packages\py2exe\build_exe.py", line 243, in run
    self._run()
  File "c:\python27\lib\site-packages\py2exe\build_exe.py", line 312, in _run
    self.create_binaries(py_files, extensions, dlls)
  File "c:\python27\lib\site-packages\py2exe\build_exe.py", line 525, in create_binaries
    self.copy_dlls(dlls)
  File "c:\python27\lib\site-packages\py2exe\build_exe.py", line 447, in copy_dlls
    self.copy_dlls_bundle_files(dlls)
  File "c:\python27\lib\site-packages\py2exe\build_exe.py", line 497, in copy_dlls_bundle_files
    self.patch_python_dll_winver(dst)
  File "c:\python27\lib\site-packages\py2exe\build_exe.py", line 1008, in patch_python_dll_winver
    add_resource(unicode_name, mfest, RT_MANIFEST, 2, False)
RuntimeError: EndUpdateResource: The system cannot open the device or file specified.

but then i run it again and it creates the exe but it doesnt work



#15 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:44 AM

Run the command prompt as administrator and try building it that way.

#16 Trey

Trey
  • 364 posts

Posted 31 July 2013 - 06:52 AM

I personally buy at 15-17 (I try to buy at 15, but will buy at 16/17 if I have very little of the 16/17 stock and tons of the 15 stock). My sell points vary between 68-75; I have higher sell points for stocks that I have less stock of (no pun intended), and lower sell points for stocks that I have a lot of.

 

Given that I prefer to take a more active approach to choosing what stocks to buy and sell and at what prices, I don't think a program will be able to meet my needs :p



#17 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:54 AM

Run the command prompt as administrator and try building it that way.

alright i did that and it created an empty dist folder then i ran it again and it put the single exe in the folder nothing else than i tried to run that and it didnt even open... :(  :(


I personally buy at 15-17 (I try to buy at 15, but will buy at 16/17 if I have very little of the 16/17 stock and tons of the 15 stock). My sell points vary between 68-75; I have higher sell points for stocks that I have less stock of (no pun intended), and lower sell points for stocks that I have a lot of.

 

Given that I prefer to take a more active approach to choosing what stocks to buy and sell and at what prices, I don't think a program will be able to meet my needs :p

 

Yeah the prog isnt for eveyone but its great practice for me :)  :lol:



#18 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 06:54 AM

In my program the rule is this:

For the first 12 hours of the day buy only stocks that I already have that are at 15.
If after this time i have not bought any stocks, i will buy any stock that hits at 15. Order of priority are stocks that i already have, then by how many transactions have taken place on that particular stock (i only did this to remove the randomness from it).

#19 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 06:57 AM

In my program the rule is this:

For the first 12 hours of the day buy only stocks that I already have that are at 15.
If after this time i have not bought any stocks, i will buy any stock that hits at 15. Order of priority are stocks that i already have, then by how many transactions have taken place on that particular stock (i only did this to remove the randomness from it).

Pyro could you just compile it for me ?? it would be alot easier!



#20 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 07:03 AM

Try this for your setup:
 
import py2exe
from distutils.core import setup

setup(
	name = "StockBuyer",
	description = "Automatically runs the stocks...?",
	version = "0.9.5",

	windows = [
		{
			'script': 'stockbuyer.py'
		}
	],

	options = {
		'py2exe': {
			'bundle_files': 3,
			'optimize': 0,
			'compressed': 1,
		}
	},
	
	zipfile = None
)
Then run "python setup.py py2exe"

I havnt tested this, im on linux right now and not near any windows computers :-P So...
Its having troubles accesing files its expecting to find and have access to...

#21 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 07:11 AM

Try this for your setup:
 

import py2exe
from distutils.core import setup

setup(
	name = "StockBuyer",
	description = "Automatically runs the stocks...?",
	version = "0.9.5",

	windows = [
		{
			'script': 'stockbuyer.py'
		}
	],

	options = {
		'py2exe': {
			'bundle_files': 3,
			'optimize': 0,
			'compressed': 1,
		}
	},
	
	zipfile = None
)
Then run "python setup.py py2exe"

I havnt tested this, im on linux right now and not near any windows computers :-P So...
Its having troubles accesing files its expecting to find and have access to...

 

 

alright so i ran it twice and it created the exe i put the txt in with it and when i run the exe i get this tracback in the log

 

Traceback (most recent call last):
  File "stockbuyer.py", line 162, in <module>
  File "stockbuyer.py", line 11, in Test_Login
EOFError: EOF when reading a line

even thought that line works fine in the .py



#22 Pyro699

Pyro699
  • 1543 posts


Users Awards

Posted 31 July 2013 - 07:13 AM

Just my 2 cents; but you might have better luck releasing this open source and getting people to download Python2.7 and running it from source. That way others (such as myself) could look at your code and give you advice. Theres not much more i can help you with given i have very little context to the problem. Maybe someone else has some ideas, i know Shadow has more experiance with Py2Exe, kway how bout you?

#23 ChristianCareaga

ChristianCareaga
  • 40 posts

Posted 31 July 2013 - 07:18 AM

Just my 2 cents; but you might have better luck releasing this open source and getting people to download Python2.7 and running it from source. That way others (such as myself) could look at your code and give you advice. Theres not much more i can help you with given i have very little context to the problem. Maybe someone else has some ideas, i know Shadow has more experiance with Py2Exe, kway how bout you?

 

I think i will release both versions the py and exe

i will get it compiled from my friend

 

thanks for all the help and advice!! :funone:  :funone:  :lol:


Edited by ChristianCareaga, 31 July 2013 - 09:55 AM.


#24 utkarsh

utkarsh
  • 19 posts

Posted 03 March 2014 - 10:53 AM

I'm trying to make a similar program, but in java. And yes, I am a total noob at this.  :unsure:





Also tagged with one or more of these keywords: python, bot, stockmarket, auto-buyer/seller

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users