Condition if CCI becomes oversold and buy when it crosses 0
Author: grtrader
Creation Date: 12/7/2017 12:07 PM
profile picture

grtrader

#1
I would like to have a program which would set a condition, lets say "Permit Buy" to "on" if the CCI becomes oversold, and to place a buy when the CCI crosses 0 and "Permit to Buy" is "on". When the buy is placed under these conditions, I would like to reset "Permit Buy" to off.

How would you program this?
profile picture

Eugene

#2
Looks like this tutorial perfectly applies to your idea:

Tutorial: Setups, Triggers, Delays, and Timeouts
profile picture

Eugene

#3
Something like this:
CODE:
Please log in to see this code.
profile picture

grtrader

#4
Thanks.
profile picture

Eugene

#5
Just an observation. I've noticed that effect of the setup timeout (setupLastsFor) is hardly visible with your condition (CCI below -100 and crosses above 0). It happens too quickly. But setting a higher threshold (+100) for the cross over lets one evaluate how it performs on a Wealth-Lab chart.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).