Other News

New Software Release: VTS EA-Builder version 4.0.0.88

 

We just released a new version of software for the VTS-MT4 Expert Advisor Builder.

Go here to review the release notes and see the latest enhancments and download the latest version:

https://www.iexpertadvisor.com/vts-ea-builder-software-update/

To get notified about the latest questions and answers, follow us!

RAQ

How Can I Chain Together Logic in an EA?

 

Q:

I am trying to create the logic for the following: Buy when price first closes below the Bollinger bands lower band and then closes back above the bollinger bands lower band. I have managed the first part ok and tested. So if I just create the logic to buy when closing below the lower band it works fine. How can I build the logic for the second part?

A:

In this case you have a one logic condition that has to occur before the other:

  • Condition 1: close below the Bollinger Bannd
  • Condition 2: close above the Bollinger Band

Obviously they will never occur at the same time (on the same “tick”), so we can’t just add 2 conditions to a logic element. Try this: Drag and drop 2 logic conditons where the “true” output of the first connects to the “In” connection of the second logic element:

Here is the important part. On the first logic element, in the above drawing CloseBelowBB, open the Power tab on the configuration and select an option for the “Minimum Required TRUE count”.  I’ll select “1 Count per run“.

This means the logic element, CloseBelowBB, only has to evaluate to “true” once, and everytime after that, execution will still follow the “true” path.

You can also select options for once per bar, or hour, etc. And even increase the count so it must be “true” more than once.

This is not easy (in my opinion). This is slightly advanced logic, but if you can wrap your head around it, you can create very powerful EA builder.

To get notified about the latest questions and answers, follow us!

RAQ