Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'm able to have C1 - C3 work, but after C4, my script doesn't draw the plot anymore, as if the script just doesn't work anymore.
All logic is valid, as there are no errors. At this point these are just bools, and the plot isn't actually tied to the conditions of the bools so I'm confused.
Can you help answer these questions from other members on NexusFi?
Your problem isn't because you have 4 bools, or however many you have there.
Without the full code, it's not going to be possible to find the error.
(BTW, the fact that there are no compile errors, if that's what you meant, does not mean that the logic is valid. I have a lot of experience with writing code that compiles, and runs with no errors, but that just is wrong.... )
If you can post the code and a description of what it does, someone can help.
Again, this kind of question cannot be answered without seeing the rest of the code, or at least enough to understand what is going on.
For what it's worth, C# does not have any restriction on the number of boolean conditions you use, so the solution is likely in something else.
But, without being able to see what the code is doing, it is hard to help.
There are many good programmers here who will try to help, but without the code, just dealing with general questions like this makes it impossible to answer.
I will help if I am able, but you need to make it possible to get the help. I am sure someone else would also pitch in.
Each condition returns its own bool, either a 1 true or a zero false. Any one condition in your example can set the resultant total bool to false unless ALL the conditions are met, take these for understanding:
For example
bool C48 = false;
if (somecondition" && "someconditions" && "somecondition" )
{
if (somecondition2" && "someconditions3" && "somecondition4" )
{
C48 = true;
}
}
But reading between the lines if you have that many conditions you are curve fitting to historical data trying to find rare conditions or some magic combination of indicator values that will rarely be met or repeated hoping for a high win percentage. The simplest methods are the most robust and flexible. Also I would guess you are looking at oscillators which at best tell you what just happened and are no more effective at telling the future than a dice roll. You need to find market fundamentals and use those conditions to base your decisions. Take all this as a grain of salt from someone who has been a programmer for close to 40 years, so I guess I know nothing.
Most likely you will thunder on Don Quixote until you see the futility of your ways. Most of the learning is at the end of the quest, denial dies hard, acceptance hurts.
Sorry if I sound more than a bit cynical but seen too many programmers before you bite the dust hard on the search for the holy grail. Best of luck.