FLX8
- ago
I've come to find the best way for me to learn how something is implemented in WL is by assembling the strategy in the Building Blocks, then just look at the C# code.

One convention I keep encountering is:

CODE:
bool condition0; if (foundPosition0 == null) {    condition0 = false;    {       condition0 = true;    }    if (condition0)    {       _transaction = PlaceTrade();    } }


is there a reason why conditon0 is false, then true?
0
617
Solved
4 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.29% )
- ago
#1
Yes, it initializes to false, and then sets to true if all of dropped conditions resolve to true. in this case it looks like there were no conditions dropped.
1
Best Answer
FLX8
- ago
#2
ok great, I actually see this is utilized when there are Entry conditions. Thanks!
0
- ago
#3
A lower level solution (implementation) will always be more efficient than a higher level solution. That's because the higher level solution adds extraneous lines to capture the "general case"; whereas, the lower level solution is more tailored to the specific problem.

Now I'm not saying high-level solutions are bad. Imagine writing your stock trading simulation in raw C# without the Wealth-Lab framework. You would have over 100,000 lines of low-level code, which you would have to maintain. In modern software engineering, we don't want to do that! We want to use high-level frameworks instead to reduce the number of lines we have to write (and maintain).

But appreciate "Blocks" is a high level solution to a low level Weath-Lab C# coding problem. Now you should better understand Blocks-to-C#-code implementation problem. Happy computing.
0
FLX8
- ago
#4
Yes, the lower level solution is best, probably the fastest way the code will execute.

I'm mostly self-taught, and a coder != software engineer.

If you want to provide examples of low level solutions for WL, that'd be great, so that I can see for myself.
0

Reply

Bookmark

Sort