Please Help me Understand Output Buffers
-
Hello!
I have noticed many indicators contain output buffers. However I am really struggling on how to get the output buffer to work for me. I am aware of trace to see how your conditions are working together. At least that's the way i think it works.
What I am looking to do is simple. I want to BUY when there is a BLUE bar. If the bar is BLUE, I BUY. If it is one of the other colors then no buying.
I have probably spent 2 or 3 hours on this trying to figure out how i get the EA to buy if the previous bar is BLUE. All attempts have failed. I set conditions like output buffer 0 crosses over output buffer 1 but no luck. I get trades being taken when the bar is indeed not blue. I have attached the indicator and also my shared project.
0_1588726717653_#Pallada_Bars.mq4
Please help me understand how to buy when it is BLUE. Also, how you got the answer so I can figure it out by myself for next time.
https://fxdreema.com/shared/X18rLWvdb
Thanks!!!
-
@nscrilla
Hi, you can first read these 2 tutorials about how to implement custom indicators in your project :
https://fxdreema.com/forum/topic/4208/tutorial-06-my-indicators-in-fxdreema
https://fxdreema.com/forum/topic/9105/tutorial-working-with-ex4-ex5-indicator-file -
Are you sure your custom indicator is properly identified in your MT4's indicator's folder?
-
Okay thank you for both your responses. I have read the tutorials. These indicators are MQ4 so the 2nd one didn't apply but I'm glad to know about it for when i have ex4s. I had previously just been skipping the Ex4 systems
This has been quite helpful. Thank you. However I still am unable to get it to work. I have used a indicator appear function and the output buffer but even still i cannot get it to buy on the blue bars. I set it to buy on one of the blue buffers and it buys on a red bar..... I am thinking that the coding is more complex than i had originally anticipated and perhaps i need to have some kind of combination of buffer crosses or buffers >'s.... Can anyone please take a look at the above indicator?
https://fxdreema.com/shared/W0O5N3Amb
This is where i got to. Basically I have traced price being > than the output buffer for all 8 buffers and i cannot see a clear level where the bars go blue and price is above the trace.
As for the indicator being properly identified, I think so? It runs and i can apply it to the Mt4 platform. Its in the indicator folder and all.
Thanks for helping!
-
Some operands in some 'condition' blocks are wsorking on candle ID 0 whereas other arte doing it on candle ID 1. I strongly recommend you to use always candle ID 1.
On the other hand, you should reaorder the nimber ID of all 'condition' blocks with a 'trace' block below them. They should have lower numbers than those connected to the buy/sell blocks. I guess the current order of execution can be the reasn for it not doing what is intended.
-
@l-andorrà said in Please Help me Understand Output Buffers:
'trace' block below them. They should have lower numbers than those connected to the buy/sell blocks. I guess the current order of execution can be the reasn for it not doing what is intend
Wowowowow. Okay so i thought those numbers on the left side of the blocks didn't mean anything? So your saying that the program will run the blocks in order based on the number on the left???
If they are not connected to anything they don't matter right?
-
Exactly. All block trees are executed exactlyu in the increasing order of those blocks on top of each one (those below it are not relevant). And yes, single blocks are not executed. They need to be connect to at least another one to do so.
-
Okay thanks. I didn't realize that you can update the little numbers on the left to whatever ones that are desired. I'm a step closer thanks!
-
You're welcome.