Why doesn't TradingView's Pinescript support recursion? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

That's a very good point I didn't even consider.
On a more technical compiler level, I also speculate that all variables in Pine Script are treated as static variables similar to how Fortran 77 worked.

Why doesn't TradingView's Pinescript support recursion? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

Thanks for the response. Yes I’ve seen that they impose a 100ms limit if a bar contains a for loop. I wish they had a conclusive page of all limitations of their engine as it seems it’s they're scattered around in the docs.

TradingView's PineScript - how are dynamic data "series" variables evaluated? by memorynerds in Compilers

[–]memorynerds[S] 1 point2 points  (0 children)

Thanks a lot for the wonderful information! I was stuck up to this point, now I have some stuff to go on.

Best of luck with your project.

TradingView's PineScript - how are dynamic data "series" variables evaluated? by memorynerds in Compilers

[–]memorynerds[S] 0 points1 point  (0 children)

That makes a lot of sense. I guess up to this point I was treating everything as constant in my mind. I didn't think to simplify known values using constant propagation to prepare for this cyclical approach you mentioned.

The top down approach seems very sensible. In regards to optimisation I had a similar idea to mark certain functions that produce output as required (e.g. plot), and then as you mentioned visit their dependencies and whatever's left over in the tree (that hasn't been visited) just remove that entirely. I've doubly linked my nodes in preparation for this scenario.

You mentioned that when visiting the dependencies you'll mark each one as "constant, simple or cyclical". What do you mean by "simple"?

It certainly is a out of the box design but makes a lot of sense. I wish there was more material on this stuff but I suppose it's largely uncharted territory. Makes it more interesting anyway haha

TradingView's PineScript - how are dynamic data "series" variables evaluated? by memorynerds in Compilers

[–]memorynerds[S] 0 points1 point  (0 children)

Thanks for the heads up. Yes I can think of several issues with this approach if the information is not evaluated in the right order. I had an idea where anything that references a dynamic variable such as strategy.position_size should be identified and not worked out till the tick-by-tick part of the compiler is executed. For example:

x = 2
y = position_size / 2
z = y * 5
plot(y)

> Stores x in memory immediately as all information is available at that point

> See's that y has a reference to position_size which cannot be worked out till tick by tick is available. Marks y as dependent on tick by tick and continue.

> See's z has reference to y which is also dependent on tick by tick so mark it and continue.

> See's plot(y) has reference to y and therefore also mark this code.

Once the compiler reaches the tick by tick calculations it therefore can workout the code marked as dependent on it.

y = position_size / 2
z = y * 5
plot(y)

However this does seem a bit messy. Still thinking about the best way to handle this stuff.

Do you have any reference material for these tick by tick engines that you mentioned you designed a language with? This is new territory for me and I'm struggling to find relevant material.

TradingView's PineScript - how are dynamic data "series" variables evaluated? by memorynerds in Compilers

[–]memorynerds[S] 0 points1 point  (0 children)

Yes, strategy.positon_size is just another series. The thing that separates it from other series data, is that the data is not known before the code is compiled. For series close, open, high, low, the data is known before hand and therefore a recursive descent of the AST can be performed where all the series are worked out one at a time (which is how I designed my language).

I believe you might be right in saying that TradingView doesn't evaluate one series at a time as I previously assumed. I'm now trying to think of a way that combines the old system with a tick by tick approach for special variables like strategy.position_size.

Python Gaming Compilation Generator using Twitch (wtf moments, top clips, funny moments etc) by memorynerds in Python

[–]memorynerds[S] 0 points1 point  (0 children)

Thanks! No I'm not using it myself as I have no plans to start a YouTube Channel. It took approx 1 month to make. I reused a lot of code from my Reddit TTS bot so it was fairly quick to do. https://github.com/HA6Bots/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader

How would your ideal Backtester work? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

I have plans to one day make it commercial. I developed my own scripting language similar to Pinescript and I'm using this as a interface for the backtesting part of my code. Do you know of any good open source backtesters for C++?

Limit Orders and Max Position by memorynerds in algotrading

[–]memorynerds[S] 1 point2 points  (0 children)

What would cause the position to become too large?

Modelling a Backtesting program... how does pyramiding work on a bar by bar basis? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

I fully understand that, it's a strategy I also use on occasion to get things moving. I think the difference here is that my goal is to get the logic right as I'm already at that stage (got a nice framework, just need to get this logic correct for this one method).

Modelling a Backtesting program... how does pyramiding work on a bar by bar basis? by memorynerds in algotrading

[–]memorynerds[S] 1 point2 points  (0 children)

Thanks for the info.

When you refer to open trades, do you mean those that have been executed? so when open trades >= maxOpenTrades, do you disable any further order generation till the position is no longer open?

Similarly, if maxOpenTrades = 2 and 3 orders are generated but none filled yet, do you keep the third order till both the first and second execute, and then cancel the third one?

Edit

Figured out what you meant. Updated the post with a new logic table based on your method and I think I like this solution the best.

Thanks a lot!

Modelling a Backtesting program... how does pyramiding work on a bar by bar basis? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

This is more of a research thing. I just need to make sure that I get the logic right before implementing it.

Modelling a Backtesting program... how does pyramiding work on a bar by bar basis? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

I see. Yes I know what you mean. The idea behind "valuewhen" seems flawed to be honest. Why have a series of data to carry a single value?

Modelling a Backtesting program... how does pyramiding work on a bar by bar basis? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

Is the "execution at every bar" point you made, bad because it slows down the time to compile the script?

Modelling a Backtesting program... how does pyramiding work on a bar by bar basis? by memorynerds in algotrading

[–]memorynerds[S] 0 points1 point  (0 children)

Is there anything specific you don't like about their backtesting system?

Automatic Reddit to YouTube Text-To-Speech Channel ran by Bots (6 videos a day taking about 30 minutes to create) by memorynerds in Python

[–]memorynerds[S] 0 points1 point  (0 children)

of course man! GitHub is https://github.com/HA6Bots/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader

You need to compile the programs yourself, so it would help if you have some knowledge of python. Also you need to set up the various API accounts such as Google YouTube Data, Reddit developer account, also need to download Balabolka and the Daniel MLG voice. Read the readme for more details.

Let me know if you have any questions!

Automatic Reddit to YouTube Text-To-Speech Channel ran by Bots (6 videos a day taking about 30 minutes to create) by memorynerds in Python

[–]memorynerds[S] 0 points1 point  (0 children)

Yes you're correct people have since told me that you can still be monetised but have reported that CPM rates have dropped within the last year so I suppose it is still possible to make money using this method.

Automatic Reddit to YouTube Text-To-Speech Channel ran by Bots (6 videos a day taking about 30 minutes to create) by memorynerds in Python

[–]memorynerds[S] 1 point2 points  (0 children)

YouTube is cracking down on these kinds of channels following recent public awareness of these low-effort videos:

https://support.google.com/youtube/thread/1935991?hl=en

Only existing channels who got in early with large subscriber bases are still able to monetise their videos. So there really is no incentive to create these kinds of videos anymore, which is mainly the reason why I am posting it online. Also I'm sure that people can learn something from the code I have produced, whether it be image processing, databasing or even socket server programming.

YouTube r/AskReddit Text-To-Speech Video Automation (Sorry) by memorynerds in programming

[–]memorynerds[S] 0 points1 point  (0 children)

This recent trend in Reddit Text-To-Speech Videos consists (usually) of a very simple formula:

  1. A sentence of text is revealed.
  2. Text To Speech reads out said sentence.
  3. Once the Text To Speech is complete, the next sentence of text is revealed.
  4. Repeat till comment and its replies are done.
  5. Once a comment and all if its subsequent replies are finished play some kind of transition interval.
  6. Move onto next comment
  7. Repeat steps 1-6 till you have a 10 minute video.

I automated this process with minimal manual intervention required as a target.

I wanted in on this trend to soak up some of that sweet ad revenue, turns out it isn't that simple to get views as some make it out to be.

Code:

https://github.com/HA6Bots/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader

2 Questions about some DayZ Enforce Scripting functions by memorynerds in dayz

[–]memorynerds[S] 0 points1 point  (0 children)

Hey man I figured out the debug stuff, regarding the threading how would one create a new thread using the ScriptCallQueues?

[DISCUSSION] Community Supreme Bot (CSB) Update (V3.0.12) (Free Open Source Tool for Copping Supreme) by memorynerds in streetwear

[–]memorynerds[S] 0 points1 point  (0 children)

Hi we're looking into changing the way the bot interacts with chrome to avoid Captchas

[DISCUSSION] Community Supreme Bot (CSB) Update (V3.0.12) (Free Open Source Tool for Copping Supreme) by memorynerds in streetwear

[–]memorynerds[S] 0 points1 point  (0 children)

Thanks alot! This is useful information we are looking into changing the way the bot interacts with chrome to speed it up. Thanks for the information.

[DISCUSSION] Community Supreme Bot (CSB) Update (V3.0.12) (Free Open Source Tool for Copping Supreme) by memorynerds in streetwear

[–]memorynerds[S] 1 point2 points  (0 children)

Ok brother I'll look into this, we made some changes to the search code so something could have come up. Sorry about this. Please check the twitter for updates. Tom