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)
if Close > ParabolicSAR( .02 , .2 , var0 , var1 , var2 , var3 ) then begin
PlotPaintBar( High , Low , Open , Close , "" , White ) ;
end
If Close < ParabolicSAR( .02 , .2 , var0 , var1 , var2 , var3 ) then begin
PlotPaintBar(High , Low , Open , Close "" , White ) ;
end
First of all, this will not compile. It says that it does not expect the second "if" statement. Therefore, my first question is what is wrong with this keeping it from accepting the second If statement.
The second issue is that, if I take out the second If statement, then it has no problems compiling - but, it colors every single bar as white. What have I done wrong so that every bar is white rather than only the bars that are above the PSAR.
If I take out the first If statement and only choose to color the bars that are below the PSAR then none of the bars will color.
If you need it, here is the ParabolicSAR function code:
2. You have both conditions painting the bar as white. Also, make sure ParabolicSAR is giving you correct values.
You don't need a course to learn Easy Language. Try these 2 guides. They are old, but if you follow the exercises, you'll get up to speed quickly, and for free.
haha, pretty dumb mistake about both conditions being white. LOL. Obviously I was working on that late last night.
Anyway, I will post the updated code. It has not changed anything so I think that it has to do with the PSAR giving the correct values. I will also post a pic of the chart. As far as I know, in the PSAR code, the only values that matter are the .02 & .2. Correct? From what I understand in the EasyLanguage dictionary that the other values are just for order entry/management.
Also, thanks a ton for the resources to learn EL. I will spend time on those.
You are using the function incorrectly. Below is info from the Help file:
Returns (Integer)
The oParCl, OParOP, oPosition, oTransition output parameters return the parabolic stop values for the current day and the next bar, as well as the probable position of the market. The ParabolicSAR itself returns 1.
Parameters
Name
Type
Description
AfStep
Numeric
Sets the acceleration increment factor.
AfLimit
Numeric
Sets the acceleration limitation factor.
oParCl
Numeric
Outputs the parabolic stop value for the current bar.
oParOp
Numeric
Outputs the parabolic stop value for the next bar.
oPosition
Numeric
Outputs the potential market position. 1 for long, -1 for short.
oTransition
Numeric
Outputs if the current bar market position has changed. 1 or -1 for reversal days 0 for holding days.
Example
Vars: oParCl(0), oParOp(0), oPostion(0), oTransition(0);
Finally got that figured out. Now it works like a charm!
Here is my next question and I can not find the answer to this anywhere in any of the easy language docs.
This one also deals with PaintBars.
Now I would like to create a paint bar if the Aroon Up indicator = 100, Close > Open, and Close > keltner Channel. But, I only want it on the first candle that closes outside of the keltner channel. Basically it needs to close back inside of the keltner channel in order to "reset".
Clearly that part is quite straight forward.
But now I need to figure out how to just make the first occurrence of the close outside of the KeltnerChannel to the painted bar.
you can also google for EasyLanguage or PowerLanguage tutorials. There are some around that might help you, too.
Other than that you are already moving into the right direction. You best learn the language when you program it. Start simple and keep getting more complex. If you run into a problem there is always a helping hand here.
you will need a flag for that. This is a variable you use to prevent the paintbar from plotting more than once.
The variable could be a Boolean variable i.e. true/false.
you can also google for EasyLanguage or PowerLanguage tutorials. There are some around that might help you, too.
Other than that you are already moving into the right direction. You best learn the language when you program it. Start simple and keep getting more complex. If you run into a problem there is always a helping hand here.
Regards,
ABCTG
Thanks a ton, ABCTG
Looks like we are practically neighbors. You are in Hamburg. I am often there as my wife's family is in Lübeck. Would be fun to meet up sometime.