if Close > ParabolicSAR( .02 , .2 , var0 , var1 , var2 , var3 ) then begin
PlotPaintBar( High , Low , Open , Close , "" , White ) ;
If Close < ParabolicSAR( .02 , .2 , var0 , var1 , var2 , var3 ) then begin
PlotPaintBar(High , Low , Open , Close "" , White ) ;
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:
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:
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.
Sets the acceleration increment factor.
Sets the acceleration limitation factor.
Outputs the parabolic stop value for the current bar.
Outputs the parabolic stop value for the next bar.
Outputs the potential market position. 1 for long, -1 for short.
Outputs if the current bar market position has changed. 1 or -1 for reversal days 0 for holding days.
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.
The following user says Thank You to ABCTG for this post: