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 need to code a breakout of high of a bar, which have a condition.
For example - this bar hit moving average from top, so it's high will be a stop buy.
Can you help answer these questions from other members on NexusFi?
you can use the print reserved word to check values within your code and see if the code is using the values you think it should. High[1] for example would return the value of the previous bar and not the bar where your conditions are met.
I am not sure I understand you correctly. Your code already does that, except you are saving the previous bar's high (using buy_stop = h[1] when you probably want the current bar's high i.e. High[0] (or simply High) instead.
Regards,
ABCTG
boo50
got it, but still want to know how to fix condition's bar high.
any suggestions?