Page 1 of 2 12 LastLast
Results 1 to 10 of 12
 1 Attachment(s)    

Thread: Squeeze_Break EA

  1. #1

    Default Squeeze_Break EA

    Hi Funyoo,
    I know that you have very little time to spend for me and I will try to create an EA based on this indicator, but I don't understood yet how the data are obtained by an indicator.
    In the logic entry inside the Ea, when I declare the variable i.e.

    double Squeeze = iCustom(...........which are the data to write here for this indicator?)

    And when I call the rules for Long/short order which are data here?

    I don't understand anything!!!!

    Thank you for all your help!!!!

    Davide
    Attached Files Attached Files

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Hi Funyoo,
    I know that you have very little time to spend for me and I will try to create an EA based on this indicator, but I don't understood yet how the data are obtained by an indicator.
    In the logic entry inside the Ea, when I declare the variable i.e.

    double Squeeze = iCustom(...........which are the data to write here for this indicator?)

    And when I call the rules for Long/short order which are data here?

    I don't understand anything!!!!

    Thank you for all your help!!!!

    Davide
    Hi paciola,

    Here are the required lines to get the values of the different colors of the indicator on the previous bar :
    Code:
    double GreenHistogram=iCustom(Symbol(),0,"Squeeze_Break",Boll_Period,Boll_Dev,Keltner_Period,Keltner_Mul,Momentum_Period,Back_Bars,Alert_On,On_Screen_Info,0,1);
    double RedHistogram=iCustom(Symbol(),0,"Squeeze_Break",Boll_Period,Boll_Dev,Keltner_Period,Keltner_Mul,Momentum_Period,Back_Bars,Alert_On,On_Screen_Info,1,1);
    double BlueLine=iCustom(Symbol(),0,"Squeeze_Break",Boll_Period,Boll_Dev,Keltner_Period,Keltner_Mul,Momentum_Period,Back_Bars,Alert_On,On_Screen_Info,2,1);
    If you want to trade when there is a green bar, say :

    Code:
    if(GreenHistogram>0)...
    For a red bar :

    Code:
    if(RedHistogram<0)...
    If you want to enter when the blue line is crossing with the 0 line :
    Code:
    PreviousBlueLine=iCustom(Symbol(),0,"Squeeze_Break",Boll_Period,Boll_Dev,Keltner_Period,Keltner_Mul,Momentum_Period,Back_Bars,Alert_On,On_Screen_Info,2,2);
    
    if(PreviousBlueLine<0 && BlueLine>0)...

  3. #3

    Default

    Many thanks Funyoo,
    you are a great man.
    But I would like to understand how to find the data I need to create an expert.
    Please which are the data inside the code of the indicator that represent the MODE in iCustom function?

  4. #4
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Many thanks Funyoo,
    you are a great man.
    But I would like to understand how to find the data I need to create an expert.
    Please which are the data inside the code of the indicator that represent the MODE in iCustom function?
    You can find a mql4 guide here with all the required knowledge.

  5. #5

    Default

    Quote Originally Posted by funyoo View Post
    You can find a mql4 guide here with all the required knowledge.
    Thank you Funyoo,
    but if I don't understand something, please can I ask you a clarification?

    Davide

  6. #6
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Thank you Funyoo,
    but if I don't understand something, please can I ask you a clarification?

    Davide
    Yes, of course.

  7. #7

    Default

    Excuse me Funyoo
    but I have a problem.
    How can I to fix my stoploss to the SMA 200 periods value?
    And if possible can this stop loss changes to every value of SMA?
    Many thanks for your help
    Davide

  8. #8
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Excuse me Funyoo
    but I have a problem.
    How can I to fix my stoploss to the SMA 200 periods value?
    And if possible can this stop loss changes to every value of SMA?
    Many thanks for your help
    Davide
    Hi paciola,

    You just need to say :

    Code:
    if(Ask<iMA(Symbol(),0,200,0,MODE_SMA,PRICE_CLOSE,0)).... code to close buy
    if(Bid>iMA(Symbol(),0,200,0,MODE_SMA,PRICE_CLOSE,0)).... code to close sell

  9. #9

    Default

    Many thanks Funyoo I try to do it.
    Bye
    Davide

  10. #10

    Default

    Quote Originally Posted by funyoo View Post
    Hi paciola,

    You just need to say :

    Code:
    if(Ask<iMA(Symbol(),0,200,0,MODE_SMA,PRICE_CLOSE,0)).... code to close buy
    if(Bid>iMA(Symbol(),0,200,0,MODE_SMA,PRICE_CLOSE,0)).... code to close sell
    Hi Funyoo
    yes it works very well, thank you.
    But I would like that the stop loss changes for every value og SMA 200, in every new bar. So in a long trend as the SMA rises the stop rises too.
    Is it possible technically?

Similar Threads

  1. Squeeze_Break.mq4 Expert Advisor
    By Salomonrule in forum Ideas for expert advisors
    Replies: 0
    Last Post: 01-02-2012, 14:50

Tags for this Thread

expert, funyoo, guide, how to, indicator, metatrader, mql, programming, sma, squeeze, stop, stoploss, thank you, time, trend

Posting Permissions

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