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)
Hi, I''m new to Easy Language and need help to understand the following pre-built Keltner channel Buy signal in Multicharts, which unhelpfully has no notes to explain what's going on! So from what I can tell it looks for a channel breakout (price crosses above the upper band) and then sets a buy stop order on the next bar at high + 1 tick. But...
...what I don't understand is:
1) why the code doesn't simply use condition1 to initiate the Buy order i.e.
2) what's going on in the "else" portion of the if else statement? It seems to be saying, if var3 is true, and either price is below the mid line (var0) or there is a new high, then var3 is false... very confused and I'm not sure why it is necessary.
3) why is "condition1" used twice to define different conditions. In terms of best practice should they not be condition1 and condition2?
4) why var4 is defined within condition1, not outside of it? Does it make any difference?
Really quite confused by this code and appreciate any help
Can you help answer these questions from other members on NexusFi?
I think the key to understanding this bit of code is that it saves certain values
at a point in time. I.e. it saves what the High is when the condition was last met
and then uses that later on.
if price crosses over the Keltner then save condition true (var3) & save this high value (var4)
else
recheck everything ->
-> if in the past var3 was set to true, but now Close < SMA or High > than prev high when condition was met
then set var3 to false again
if var3 = true then buy at High + 1 point
//--------
I think theres some logic missing in the else part that's not right but I suspect what the person
was trying to do was something like -> a signal happens and then there's a pullback afterwards or
price keeps heading higher then do the following [but not finished coding]
HTH
The following user says Thank You to bchip for this post: