NexusFi: Find Your Edge


Home Menu

 





Dinapoli MACD predictor need help with scan programming


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,302 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

Dinapoli MACD predictor need help with scan programming

  #1 (permalink)
jnix
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;

Reply With Quote




Last Updated on May 2, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts