Results 1 to 1 of 1
 2 Attachment(s)    

Thread: Hull variation 2 indicator EA

  1. #1
    Junior Member
    Join Date
    Apr 2016

    Default Hull variation 2 indicator EA

    Hello guys,
    I am new to MQL4 programming.
    Now I'm trying to use the indicator Hull variation 2

    I'm trying the code below but it does not work opens in the wrong direction

    //Culclate Indicator

    double Hull_Up = iCustom(NULL,0,"Hull variation 2", HMAPeriod,HMAPrice,HMADivisor,0,0);; //Uptrend of Previous Bar Blue Up
    double Hull_Dn = iCustom(NULL,0,"Hull variation 2", HMAPeriod,HMAPrice,HMADivisor,0,1); //Dntrend of Previous Bar Red Down

    // Buy and Sell Open
    double MyPoint=Point;
    if(Digits==3 || Digits==5) MyPoint=Point*10;

    if(TotalOrdersCount()==0 && AllowTradesByTime()==True)
    int result=0;

    if(Hull_Up > Hull_Dn) // Here is your open buy rule
    result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage ,0,0,Comentario,MagicNumber,0,Blue);


    if(Hull_Up < Hull_Dn) // Here is your open Sell rule
    result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippag e,0,0,Comentario,MagicNumber,0,Red);


    In the EA Hull_Variation_RB_EA.mq4 attached the order is opening only once after it is closed does not open a new one.

    Many orders open in the right direction indicator but are negative and lose a lot of money.

    Attached SLOPE EA that has the same problem and does not close the orders by the indicator.

    Could anyone help me to improve this EA?

    Thank you.
    Attached Files Attached Files

Similar Threads

  1. Understanding Initial and Variation Margin
    By painofhell in forum Trading discussion
    Replies: 0
    Last Post: 02-13-2015, 16:44
  2. Hull Moving Average EA
    By Corre in forum Ideas for expert advisors
    Replies: 6
    Last Post: 04-03-2013, 07:51
  3. Replies: 3
    Last Post: 01-06-2011, 15:09

Tags for this Thread

indicator, magic, money, mq4, mql, mql4, programming, slippage

Posting Permissions

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