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)
Hello! Help with the coding indicator.
It is necessary that if the tick exceeds the tick and this condition is also fulfilled on the next bar, then the values of these ticks should be summed up before the appearance of the down tix over the apix. And output this summarized histogram at the bottom of the chart.
Here is the code I wrote. But apparently there are errors. Please help me fix it.
Can you help answer these questions from other members on NexusFi?
can you elaborate a bit more what exactly you are trying to compute and to measure as this might help in pointing you in the right direction.
Instead of using arrays you might just require two variables that you reset when the opposite condition is met and otherwise add the the value of Up- or DownTicks.
Besides that your "if BarType <= 1 or BarType >= 5 then" statement only affects part of your code, is this intended?
The idea is this. If up ticks in a bar are more than down ticks and in subsequent bars the same condition, then sum up ticks. As soon as subsequent bars exceed down ticks more up ticks, then sum the down ticks. And the amount of up ticks and down ticks display on the historgam below.
based on your code you could accomplish the same with two variables. When your condition "If (UpTicks > DownTicks) " is met you add the value of UpTicks to a variable and vice versa using another variable for your second condition, but using DownTicks.
This way these two variables will hold the summation of UpTicks and DownTicks for the bars where your conditions are valid.