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)
Basically, it is to test for the scenario when current bar closes equal or higher to previous bar high AND the real body of the current bar is greater than the previous bar.
Then, how long does it last - 1 bar, 2 bars etc.
In current state, the attached RB2RBL strategy (in incorrect state, as picked by you) actually picks up and "trades" ANY bar colour or Doji - just compares their size of real body.
I may try variations of that and test only by the same body colour (like in second snapshot).
Is it OK to use "<=" in conditions set 2 and 4 or it should strictly be "<", like in your sets?
Or no difference for NT to understand it?
With more code etc., you can use the NT optimizer to "answer" that question. Not sure if it can be coded with just the SB, I'd have to think about it longer to answer that question; but off the top of my head--I think it can.
I use this sort of thing sometimes. I call it a TIME STOP. It's a stop based on the number of bars since entry, and not price levels. I would use it along with traditional price level stops.
Maybe try the thread in this site where someone says they will code indicators for free?
As your code currently exists, it "makes no difference." HOWEVER, the way you did it was not proper. The way I did it was more proper.
The way you did it originally allows a situation where TWO sets (of the first four) would be true at the same time. This would have occurred when the open and the close are equal.
The way I did it allows for only one set (of the first four) to be true at a time.
The way you did it can lead to difficult to diagnose and fix bugs should you decide to expand you code/strategy; and, it's a poor habit to develop as a coder.
Like I said, in your small example, it makes no actual difference; but it's just not the logical thing to do.
It's irrelevant now, since you corrected your code. But I forgot to mention, for the record, that having unnecessary/redundant code not only adds difficulty to troubleshooting; it also slows down code execution. (It doesn't matter much with smaller programs like yours, but small programs have a tendency to one day become, big programs )