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)
Strategy: ignore parts entry condition (failing per bool)
I am having the situation, that I want in the parameter list switch on and off parts of my entry condition. But they are all linked with an AND ("&&"). So I cant use a bool with true or false for ignoring the part of the condition.
So my idea is, that I am using a "//"-button. But for that I am having no idea, how to solve or: is it possible to switch on and off from parameter list with the "//"?
It is possible to solve this - no matter, how complex a line (a condition from the set) is?
Thank you for your ideas
Best regards,
Renkotrader
Can you help answer these questions from other members on NexusFi?
I set your code in my test strategy. I am tinking, that I did its at best kind of doing, but so it does not work. To much trades is the result. The filter (on/off) does not work.
Fot this I changed the long entry - the short entry is original and works, so you can compare the resultat.
In the attachment you can find the file for analyzing.
I hope, we can solve this problem
Have a great day,
Renkotrader
Elite Membership required to download: ExampleActivFilter.cs
I think, I had understooden the way of your solution to build the short version and the opposite: different exit conditions.
So the "key" for the entries is the direction = long or short (shouldEnterLong) (shouldEnterShort).
That means, that I am no more using a single entry signal and then some filters in my logic - I see its as a "paket" of conditions.
And the same I can do now with the stops: two oder three or four methodes and the "key" is using indicator stops. Here are "yes" or "no" possible, too. If i say "no", then a standard stop condition will take the job:
SetStopLoss(@"EntryShort", CalculationMode.Ticks, 60, false); (with a stop loss, who represents the maximum, that I want to loose as emergency stopp.
If I say "yes", the indicator stop will do the job and the "hard stop" will quit automatically.
So thank you very much, trendisyourfriend. Now one of my problems in programming is solved