Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
 0 Attachment(s)    

Thread: Indicator Problem

  1. #11

    Default

    Quote Originally Posted by ixbone View Post
    well i dont understand the logic completly well, but whatever, 5 for 5 digits, 0.5 for 4 digits broker, it works, thats the point :-) i'll keep your quote in my mind, if someday i need it.
    The purpose of the MathAbs is to turn a negative number into a positive number. So, if the MACD is -0.0023, it will return 0.0023 instead. In this application it means you can go both long and short with the MACD either above or below the zero line. If, however, the MACD is very close to the zero line, the EA won't trade.

    The other thing here is that you are normalising the double to 4 decimal places. So, if the MACD is 0.00009, the equation will return 0.0000 instead because it will ignore the value of the 5th decimal place. If you are setting your trade entry threshold at 0.00005 (ie 5 * Point for a 5-digit broker), then the trade won't actually trip until the MACD hits 0.0001 rather than the 0.00005 which I suspect you may have intended.

    That's why I questioned the use of the two functions to process the MACD in my earlier post.

  2. #12
    Member
    Join Date
    Jan 2009
    Location
    Austria
    Posts
    325

    Default

    Quote Originally Posted by jezzer1961 View Post
    The purpose of the MathAbs is to turn a negative number into a positive number. So, if the MACD is -0.0023, it will return 0.0023 instead. In this application it means you can go both long and short with the MACD either above or below the zero line. If, however, the MACD is very close to the zero line, the EA won't trade.

    The other thing here is that you are normalising the double to 4 decimal places. So, if the MACD is 0.00009, the equation will return 0.0000 instead because it will ignore the value of the 5th decimal place. If you are setting your trade entry threshold at 0.00005 (ie 5 * Point for a 5-digit broker), then the trade won't actually trip until the MACD hits 0.0001 rather than the 0.00005 which I suspect you may have intended.

    That's why I questioned the use of the two functions to process the MACD in my earlier post.
    jezzer,

    thx, for your help and explanation, it helps me a lot zu understand how indis are working

    this code is combined with 3 other indis (stoch,rvi,rsi) to generate entry signals, all indis must confirm the signal in their given range, then the ea opens the buy/sell trade. yes there not so much confirmed signals, but i trade more pairs for diversification and higher lot size.
    My mistake was my non understanding of the 5*points logic (unusually for me). stoch, rvi, rsi coding wasnt a problem for me, but this macd code snippet was for testing first (5digits broker) and was working properly with the others indies well, so i dont remove it. As an technician, "i must know" how it works and why it dont work on 4 digits.
    My EA is an high secure martingale system, with 4 indies, separate reverse and non reverse EA, basket, time trading and much more features.

    So thanks again for your help, without your suggestions, i can only trade on 5 digits broker, now i can trade both = broker quote engine diversification + broker time diversification

    IX
    Last edited by ixbone; 05-19-2009 at 23:24.

Similar Threads

  1. Help- SL problem
    By shabeer.a100 in forum Softwares
    Replies: 1
    Last Post: 09-12-2013, 15:00
  2. Problem with an ea
    By stotzman in forum MQL programming
    Replies: 1
    Last Post: 07-08-2013, 12:57
  3. Help- SL problem
    By shabeer.a100 in forum Ideas for expert advisors
    Replies: 1
    Last Post: 11-22-2012, 03:07
  4. Help- SL problem
    By shabeer.a100 in forum Scripts and other tools
    Replies: 0
    Last Post: 11-21-2012, 13:57
  5. Custom indicator problem
    By scorch351 in forum Indicators
    Replies: 0
    Last Post: 06-21-2009, 11:50

Tags for this Thread

broker, coding, correlation, equation, indicator, macd, main, martingale, programmer, review, rsi, signal, signals, stoch, system, time, trading

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •