r/pythontips • • Jan 02 '21

Module Trading program

Hi, I currently trade stocks using signals given to me by my friend in discord, I was wondering if there was a way I could program something so the information could be copied from the discord and pasted into my broker? There would also be a slight translation. As the dates he writes out are written like 1/15 whereas my trading program only recognised them as January the 15th? Any help would be massively appreciated thanks!

26 Upvotes

21 comments sorted by

8

u/[deleted] Jan 02 '21

You could use selenium to copy your friend's message from the browser. Or maybe discord has an API ? And then you'll have to use either selenium (if your trading interface is in the browser) or again, you could use an API if your exchange provides one to buy/sell.

1

u/Aware_Masterpiece_63 Jan 02 '21

Interesting thanks, I'm not familiar with programming at all so this is a new venture, all I want to do is effectively copy and paste but with translating the date? Does this apply to that? Thanks again

3

u/[deleted] Jan 02 '21

I don't see any other way than using a programming language. (There might be another). Converting dates isn't going to be a problem at all. The ones that are saying dealing with dates is hard are speaking out of their butt. :) Dates are one of the most basic things in programming. But since you mention that you've no programming experience, I do see that as a hindrance. But this is absolutely not something you should hire a developer for. (Unless you have a lot of money lying around, in which case you can give me a quote and I can think of doing it for you :) ).

Watching some YT tutorials, I'd say you could get it up and running in a month. Someone who knows how to do it would take less than a few hours. The advantage of doing it yourself is that you'll then have many more ideas on how you can integrate programming to improve your trading practices.

All the best :)

1

u/[deleted] Jan 02 '21

Selenium in a library in Python (Also Java). I just realized that you might not know that. :) But took it for granted when I typed out the first comment since this is a python sub.

0

u/CraigAT Jan 03 '21

You could probably cut and paste into Excel (say into cell A1) then using Excel formulas cut up and restructure the information as you want it (putting the result into A2), then copy the results in cell A2 out of Excel into your trading app. You can save the Excel file, then next next time paste your friends input into cell A1 and if your formula is built correctly the info you want will be in cell A2 - you may have to tweak your formulas.

Apologies for the non-Python answer. It definitely could be done using Python too, you could write a script/program to take your friends info (at worse cut and paste) and produce whatever output you want. Interacting with Discord or your trading app will be more difficult but doable too.

-8

u/Grammar-Bot-Elite Jan 02 '21

/u/anuragtk8, I have found an error in your comment:

“you'll have to your [you're] either selenium”

You, anuragtk8, should use “you'll have to your [you're] either selenium” instead. ‘Your’ is possessive; ‘you're’ means ‘you are’.

This is an automated bot. I do not intend to shame your mistakes. If you think the errors which I found are incorrect, please contact me through DMs or contact my owner EliteDaMyth!

3

u/BlobbyMcBlobber Jan 03 '21

You can go the other way and write a Discord bot that handles the messages for you. However, this is something a bit scary when it involves real money, so I advise contacting experienced programmers for this.

1

u/sunshinerocket Jan 03 '21

I also am part of a discord group which gives out signals and been searching for the same solution, not sure if there's an api that could be put into play i did some digging around at a time then got distracted, id like to figure this out....

1

u/allexks Jan 03 '21

You can use discord.py (https://discordpy.readthedocs.io/en/latest/) to make a bot/client that reads the messages I guess

-6

u/GodIsInsideOfYou Jan 02 '21

Lol. Imagine day trading based on technical analysis. Do you also buy coloring books?

7

u/twenty-tentacles Jan 02 '21

It looks like someone's new years resolution was to be a troll

-4

u/GodIsInsideOfYou Jan 02 '21

I suggest learning what semi-form efficient markets mean before you call me a troll

2

u/iggy555 Jan 02 '21

I do it and love it 🥰 Sick profits too

🤗

-1

u/GodIsInsideOfYou Jan 03 '21

Everyone thinks they’re God’s gift to the world in a bull market lol

1

u/iggy555 Jan 03 '21

Has nothing to do with bull. System has worked over 3 decades

-1

u/GodIsInsideOfYou Jan 03 '21 edited Jan 03 '21

Lmfao no one trades on technical analysis you idiot. The only ones who moves markets are large funds, and they have petabytes of data available to them. They base their trades on either fundamental analysis or quantitative analysis.

Technical analysis only works if a large majority of market participants trade based on that methodology, but very few people do. If technical analysis was a viable strategy, then everyone would implement it, because the data is available for everyone. Free information cannot be used to achieve higher returns.

Thanks for the laughs, kid

3

u/iggy555 Jan 03 '21

Man you’re stupid holy crap.

-1

u/GodIsInsideOfYou Jan 03 '21

I literally work in financial services and have a CFA buddy. Hate to break it to you, but your methods have never worked in the last 30 years.

Go to r/CFA and talk about technical analysis. Everyone will laugh at you

I’m genuinely shocked a hick like you has a net worth of more than 100k

2

u/iggy555 Jan 03 '21 edited Jan 03 '21

Lol I have a cfa too moron. If you think the market is efficient you need to give your charter back.

Don’t be mad at me for making easy money while you slave away.

I have every trade saved and time stamped kid. Good luck with your teller position.

Here is the cfa 2021 update sucker https://www.cfainstitute.org/en/membership/professional-development/refresher-readings/technical-analysis

Edit: how does it feel to be a world class moron?

-1

u/GodIsInsideOfYou Jan 03 '21 edited Jan 03 '21

I love you man. These laughs just keep on coming.

Do you remember what MM had to say about technical analysis? He said something along the lines of “the people who wrote this reading need to have their CFA designations revoked.”

No professional in the industry believes in that garbage.

Easy money? Proof of returns? I doubt you’ll show that haha

Let me put this into perspective. Someone who is too stupid to understand a child level programming language somehow has the secret to free money? Is this the same person who asks embarrassing questions on r/investing?

Cherry picking winning trades does NOT constitute a viable strategy.

Seriously, go to r/CFA and talking about technical analysis. I would love to follow the post

2

u/iggy555 Jan 03 '21

You’re a joke.

Good luck with the deep throating 😂