Page 12 of 13 FirstFirst ... 210111213 LastLast
Results 111 to 120 of 123
  45 45 Attachment(s)    

Thread: Parabolic SAR EA

  1. #111
    Junior Member
    Join Date
    Oct 2011
    Posts
    7

    Default

    hi
    Can you edit EA so, that robot buy, then Parabolic SAR show sell and sell then Parabolic SAR show buy

  2. #112
    Junior Member
    Join Date
    Nov 2009
    Posts
    1

    Default need help

    Hello everyone,

    I seek help in developing an EA using SAR trend (0.02, 0.1) with better volume chart bars (shows when professionals are buying or selling) during UK and US sessions only.

    I can share the setup and rules with the person willing to help. Thanks

  3. #113
    Junior Member
    Join Date
    Feb 2012
    Posts
    2

    Default

    Quote Originally Posted by forexrookie View Post
    Hello everyone,

    I seek help in developing an EA using SAR trend (0.02, 0.1) with better volume chart bars (shows when professionals are buying or selling) during UK and US sessions only.

    I can share the setup and rules with the person willing to help. Thanks
    i can help you
    bolbol911@gmail.com

  4. #114
    Junior Member
    Join Date
    Jul 2012
    Posts
    1

    Default

    Hello,

    I have a problem with the parabolic sar and 3 sma expert. It works very well, but I want to have a stop loss and when I set any stop loss the EA stops working. Please help.

  5. #115
    Junior Member
    Join Date
    Oct 2012
    Posts
    4

    Default

    Hi funyoo you very smart to be able to give answers to every question posed, I am very interested in Layana in this forum. I will always keep abreast in this forum thanks......

  6. #116
    Junior Member
    Join Date
    Oct 2012
    Posts
    4

    Default

    Hi, I need your help to change or add any useful function in this Parabolic_MACD_MA EA. If possible, the EA is used to M5, M15 (EURUSD, GBPUSD, EURGBP, USDCAD rate & gbpchf). I appreciate your help.

    Thanks ..
    Download here: Parabolic_MACD_MA EA.mq4

  7. #117
    Junior Member
    Join Date
    Oct 2012
    Posts
    4

    Default

    Hi, I need your help to change or add any useful function in this EA. If possible, the EA is used to M5, M15 (EURUSD, GBPUSD, EURGBP, USDCAD rate & gbpchf). I appreciate your help.

    Thanks ..
    keyworldmarketing.blogspot.com

    The code is like bellow:
    ------------------------
    //+------------------------------------------------------------------+
    //| |
    //| This EA should be good for eurusd, gbpusd, "eurgbp", |
    //| usdcad, gbpchf with default setting. |
    //| For M5 & M15 timeframe only. |
    //| |
    //+------------------------------------------------------------------+

    #property copyright ""
    #property link ""

    extern int MagicNumber = 0;
    extern bool EachTickMode = False;
    extern double Lots = 0.01;
    extern int Slippage = 3;
    extern bool StopLossMode = True;
    extern int StopLoss = 20;
    extern bool TakeProfitMode = True;
    extern int TakeProfit = 10;
    extern bool TrailingStopMode = True;
    extern int TrailingStop = 10;
    extern double MaximumRisk =0.15;
    extern double DecreaseFactor =3;
    extern int MaxOrders = 3;
    extern int FromHourTrade = 8;
    extern int ToHourTrade = 18;
    bool UseHourTrade = True;

    #define SIGNAL_NONE 0
    #define SIGNAL_BUY 1
    #define SIGNAL_SELL 2
    #define SIGNAL_CLOSEBUY 3
    #define SIGNAL_CLOSESELL 4

    int BarCount;
    int Current;
    bool TickCheck = False; //False & True
    //+------------------------------------------------------------------+
    //| expert initialization function |
    //+------------------------------------------------------------------+
    int init() {
    BarCount = Bars;

    if (EachTickMode) Current = 0; else Current = 1;

    return(0);
    }

    //+------------------------------------------------------------------+
    //| expert deinitialization function |
    //+------------------------------------------------------------------+
    int deinit() {
    return(0);
    }

    //+------------------------------------------------------------------+
    //| expert start function |
    //+------------------------------------------------------------------+
    int start() {
    if (UseHourTrade){
    if (!(Hour()>=FromHourTrade && Hour()<=ToHourTrade)) {
    Comment("Real Still Mula Beraksi");

    }
    }
    int Order = SIGNAL_NONE;
    int Total, Ticket;
    double StopLossLevel, TakeProfitLevel;

    int digit = MarketInfo(Symbol(),MODE_DIGITS);

    if (EachTickMode && Bars != BarCount) EachTickMode = False;
    Total = OrdersTotal();
    Order = SIGNAL_NONE;

    //+------------------------------------------------------------------+
    //| Signal Begin |
    //+------------------------------------------------------------------+

    //double Buy1_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 1);
    // double Buy1_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

    //double Buy2_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 0);
    // double Buy2_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

    double Buy3_1 = iSAR(NULL, 0, 0.05, 0.1, Current + 1);
    double Buy3_2 = iSAR(NULL, 0, 0.05, 0.1, Current + 0);

    //double Buy4_1 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 1);
    //double Buy4_2 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 0);

    // double Sell1_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 1);
    //double Sell1_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

    //double Sell2_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 0);
    // double Sell2_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

    double Sell3_1 = iSAR(NULL, 0, 0.05, 0.1, Current + 1);
    double Sell3_2 = iSAR(NULL, 0, 0.05, 0.1, Current + 0);

    //double Sell4_1 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 1);
    //double Sell4_2 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 0);

    if (Buy3_1 < Buy3_2 && Hour()>=FromHourTrade && Hour()<=ToHourTrade) Order = SIGNAL_BUY;
    if (Sell3_1 > Sell3_2 && Hour()>=FromHourTrade && Hour()<=ToHourTrade) Order = SIGNAL_SELL;


    // if (Buy1_1 < Buy1_2 && Buy2_1 >= Buy2_2 && Buy3_1 < Buy3_2 && Buy4_1 < Buy4_2 && Hour()>=FromHourTrade && Hour()<=ToHourTrade) Order = SIGNAL_BUY;
    // if (Sell1_1 > Sell1_2 && Sell2_1 <= Sell2_2 && Sell3_1 > Sell3_2 && Sell4_1 > Sell4_2 && Hour()>=FromHourTrade && Hour()<=ToHourTrade) Order = SIGNAL_SELL;

    //+------------------------------------------------------------------+
    //| Signal End |
    //+------------------------------------------------------------------+

    //Buy
    if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
    if(ScanTrades() < MaxOrders) {
    //Check free margin
    if (AccountFreeMargin() < (1.0 * Lots)) {
    Print("We have no money. Free Margin = ", AccountFreeMargin());
    return(0);
    }

    StopLossLevel = Ask - StopLoss * Point;
    TakeProfitLevel = Ask + TakeProfit * Point;
    Ticket = OrderSend(Symbol(), OP_BUY, LotsOptimized(),
    NormalizeDouble(Ask,digit),
    Slippage,
    NormalizeDouble(StopLossLevel,digit),
    NormalizeDouble(TakeProfitLevel,digit),
    "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
    if(Ticket > 0) {
    if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) Print("BUY order opened : ", OrderOpenPrice()); else Print("Error opening BUY order : ", GetLastError());
    }
    if (EachTickMode) TickCheck = True;
    if (!EachTickMode) BarCount = Bars;
    return(0);
    }
    }



    //Sell
    if (Order == SIGNAL_SELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
    if(ScanTrades() < MaxOrders) {
    //Check free margin
    if (AccountFreeMargin() < (1.0 * Lots)) {
    Print("We have no money. Free Margin = ", AccountFreeMargin());
    return(0);
    }
    StopLossLevel = Bid + StopLoss * Point;
    TakeProfitLevel = Bid - TakeProfit * Point;
    Ticket = OrderSend(Symbol(), OP_SELL, LotsOptimized(),
    NormalizeDouble(Bid,digit),
    Slippage,
    NormalizeDouble(StopLossLevel,digit),
    NormalizeDouble(TakeProfitLevel,digit),
    "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink);



    if(Ticket > 0) {
    if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) Print("SELL order opened : ", OrderOpenPrice()); else Print("Error opening SELL order : ", GetLastError());
    }
    if (EachTickMode) TickCheck = True;
    if (!EachTickMode) BarCount = Bars;
    return(0);
    }
    }

    //Check position
    for (int i = 0; i < Total; i ++) {
    OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
    if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
    if(OrderType() == OP_BUY && OrderMagicNumber()==MagicNumber ) {
    //Close
    if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
    OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);
    if (EachTickMode) TickCheck = True;
    if (!EachTickMode) BarCount = Bars;
    return(0);
    }
    //Trailing stop
    if(TrailingStopMode && TrailingStop > 0) {
    if(Bid - OrderOpenPrice() > Point * TrailingStop) {
    if(OrderStopLoss() < Bid - Point * TrailingStop) {
    OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen);
    if (!EachTickMode) BarCount = Bars;
    return(0);
    }
    }
    }
    } else {
    if(OrderType()==OP_SELL && OrderMagicNumber()==MagicNumber)
    {

    //Close
    if (Order == SIGNAL_CLOSESELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount))))
    {
    OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, DarkOrange);
    if (EachTickMode) TickCheck = True;
    if (!EachTickMode) BarCount = Bars;
    return(0);
    }
    //Trailing stop
    if (TrailingStopMode && TrailingStop > 0)
    {
    if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) {
    if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) {
    OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange);
    if (!EachTickMode) BarCount = Bars;
    return(0);
    }
    }
    }
    }}
    }
    }

    if (!EachTickMode) BarCount = Bars;

    return(0);
    }

    int ScanTrades()
    {
    int total = OrdersTotal();
    int numords = 0;

    for(int cnt=0; cnt<total; cnt++)
    {
    OrderSelect(cnt, SELECT_BY_POS);
    if(OrderSymbol() == Symbol() && OrderType()<=OP_SELLSTOP && OrderMagicNumber() == MagicNumber)
    numords++;
    }
    return(numords);
    }

    //bool ExistPositions() {
    // for (int i=0; i<OrdersTotal(); i++) {
    // if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
    // if (OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber) {
    // return(True);
    // }
    // }
    // }
    // return(false);
    //}

    double LotsOptimized()
    {
    double lot=Lots;
    int orders=HistoryTotal(); // history orders total
    int losses=0; // number of losses orders without a break
    //---- select lot size
    if(MaximumRisk>0)lot=NormalizeDouble(Lots*AccountF reeMargin()*MaximumRisk/1000.0,1);
    //---- calcuulate number of losses orders without a break
    if(DecreaseFactor>0)
    {
    for(int i=orders-1;i>=0;i--)
    {
    if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==fals e) { Print("Error in history!"); break; }
    if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL) continue;
    //----
    if(OrderProfit()>0) break;
    if(OrderProfit()<0) losses++;
    }
    if(losses>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1);
    }
    //---- return lot size
    if(lot<0.01) lot=0.01;
    return(lot);
    }


    //+------------------------------------------------------------------+
    Last edited by keyworld; 10-30-2012 at 12:20. Reason: Modify content

  8. #118
    Junior Member
    Join Date
    Dec 2012
    Posts
    1

    Default

    Quote Originally Posted by funyoo View Post


    Parabolic SAR expert advisor.

    Parabolic SAR file has to be put in the indicators folder.

    EU H1. Step 0.002 Maximum 0.2.

    MDD : 7.82%

    Ratio : 16.62 (Profit Factor/MDD)
    Dear funyoo

    Could you please advise me about this method by using take profit ans stop loss

    for example take profit 30 and stop loss 20

    Best Regards

  9. #119

    Default

    Quote Originally Posted by funyoo View Post
    Hi 823,

    Look on the first post, it is the basic version.

    You have to put the "parabolic sar" mq4 file in the indicators folder.
    Hi Funyoo,

    I am still beginner. Please accept my apology, if i ask basic question.

    I have same question with 823.
    I have put "Parabolic SAR EA.mq4" in indicators folder. and have compiled it using Meta Editor. it created "Parabolic SAR EA.ex4" only in indicators folder also.
    there is no "Parabolic SAR EA.mq4" in /expert folder. so, when i'm trying to back testing using strategy tester, i can't find Parabolic SAR EA in dropdown list "Expert Advisor" in Strategy Tester.

    then, i tried to copy manually Parabolic SAR EA.mq4 & Parabolic SAR EA.ex4 to /expert folder. and then tried to executed Parabolic SAR EA to GBPUSD pair H5, but still no result. is it any wrong in what i did?

    I just want to analyze basic EA performance. I cannot catch up with complicated strategy yet. so, testing with basic PSAR will be enough for me right now.

    really need your help. thank you.

  10. #120
    Junior Member
    Join Date
    Apr 2012
    Location
    London, United Kingdom
    Posts
    5

    Default

    Hello Funyo,
    I have an urgent favor that I would like you to help me out with
    I have this PSAR Ea version 2 that I got online from , but the problem with it is that it does not have a MULTIPLE TRADE character programmed into it.
    In other words, it enters trade once the Parabolic Sar changes direction and that is all.
    I want it to enter trade at every dot of the parabolic sar. Can you do it for me PLEASE.
    if you do not have the EA let me know then I will send it to you.
    Tnx
    Remy

Similar Threads

  1. Parabolic SAR EA
    By mehoolsheth in forum Expert advisors backtesting
    Replies: 1
    Last Post: 03-18-2011, 14:16
  2. SAR Parabolic Indicator
    By tattoo-angel in forum Indicators
    Replies: 2
    Last Post: 03-07-2011, 10:53
  3. FT_Scalp Parabolic MMR
    By Chilibowl in forum Expert advisors backtesting
    Replies: 12
    Last Post: 09-13-2010, 23:13
  4. Parabolic question
    By forexpop in forum MQL programming
    Replies: 2
    Last Post: 05-08-2009, 10:14
  5. FT_Scalp Parabolic
    By funyoo in forum Expert advisors live statements
    Replies: 6
    Last Post: 03-03-2009, 22:17

Tags for this Thread

100, 2011, advisor, automatic, average, backtest, backtesting, beginner, breakeven, candle, change, closing, coding, color, copy, custom indicator, demo, eas, elite, eur, eur/usd, eurusd, ex4, expert, expert advisor, experts, forex, free, gbpusd, guide, hedge, home, indicator, indicators, live, macd, magic, magic number, main, manual, manual trading, manual trading system, martingale, metatrader, moving average, mq4, mql, mt4, offer, online, oscillator, osma, parabolic sar, profit, profit factor, profitable, programming, real, renko, repaint, request, robot, rsi, sells, signal, signals, simple, slippage, sma, stop, stoploss, strategy, support, system, test, thank you, time, timefilter, tool, trading, trading system, trailing, trailingstep, trailingstop, trend, usd

Posting Permissions

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