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)
you have to add filters that can help you filter out your logic, instead of piggyback on existing filters.
eg.
you have a true/false filter called okSell.
there is a set of condition that governs this filter.
ie. marketposition = 1 and DSVal crosses above Overbought.
subsequently you declared that okSell = false.
Well, you can't do that.
This is like telling your daughter she is not your daughter anymore because you said so.
the only time the oksell filter equals to false is when the above conditions do not meet the criteria.
When that happens, you do not need to declare it, oksell AUTOMATICALLY becomes false.
What happened in your code is,
after you have declared oksell = false,
as soon as you turned around (in the next tick),
oksell becomes true again.
Hope the above makes sense.
Can you help answer these questions from other members on NexusFi?
That makes perfect sense and you are 100% correct. This is exactly the problem I'm trying to overcome. The question is, how?
Once DSVal crosses above the OB, the okSell is set true it will remain true until the condition is no longer met.
Sometimes this cross above happens outside of a trade and I will enter a trade with this variable already set to true. So if the Momentum indicator goes down one day, an exit order will trigger even though the criteria hasn't been fully met by crossing above the OB line. Thereby giving me a bad case of premature evacuation.
So I need to figure how to set it back to false on my trade entry and force it to have to cross above the OB line again in order to be true. Back to the drawing board I go.