Atlanta, GA USA
Posts: 1 since Jan 2015
Thanks Given: 0
Thanks Received: 0
|
I am going to start by sharing a TOS study I created using Dinapoli's MACD Predictor equations. Then I am going to ask for help creating a scan since I have messed around with it for over 4 months with results that are not shown. The study will be below for anyone that would like to test it out. It uses the MACD with Fast = 8.3897 Slow = 17.5185 and Length = 9.0503 (From Trading Dinapoli Levels) and plots where the MACD changes. I ask that if you want to learn about it that you search around the internet for Dinapoli and read his book rather than ask me a bunch of questions.
What I want is to create a scan that returns a cross above the "Crossprice" from the study below. I have tried scanning where the open was less than and the close was greater than. But it doesn't seem to work for me. If I need to add a boolean arrow in the study itself I can but I was hoping the Scan could do the math. Thanks in advance and good hunting.
input FAST = 8.3897;
input SLOW = 17.5185;
input Length = 9.0503;
#Constants
def a = 2 / (1 + FAST);
def b = 1 - a;
def c = 2 / (1 + SLOW);
def d = 1 - c;
def e = 2 / (1 + Length);
def f = 1 - e;
rec FASTMAQ = (close[1] * a) + (FASTMAQ[1] * b);
rec SLOWMAQ = (close[1] * c) + (SLOWMAQ[1] * d);
def MACD = FastMAQ - SLOWMAQ;
rec Signal = (MACD * e) + (Signal[1] * f);
plot Crossprice = ((Signal * f) + (FASTMAQ * b * e) - (SLOWMAQ * d * e) -
(FASTMAQ * b) + (SLOWMAQ * d)) / (a - c - (a * e) + (c * e));
plot xPrice = CrossPrice;
|