Results 1 to 9 of 9
 6 Attachment(s)    

Thread: {Req ea} Wma line & TudorGirl_Vorticity_2

  1. #1

    Default {Req ea} Wma line & TudorGirl_Vorticity_2

    Dear Funyoo.

    i have request ea.
    please make ea with this indicator,
    or if you dont have a time.
    please write only the logic for buy or sell. with combine the indicator.
    many thanks for you.
    Attached Files Attached Files

  2. #2

    Default

    Will have a look at it now. Give me 10minutes

  3. #3

    Default

    Done, just fixing AltOrder function so that it only opens in buy sell pattern, rather than trading every signal.

    Please bear in mind that TudorGirl_Vorticity_2.mq4 repaints up to 6 bars back.

  4. #4

    Default

    OK, here it is. Have fun


    @Funyoo

    Please can you include this code in your template. I have canabalized the code of martingale for it, but it is very effective.


    Code:
    //Initialization
    //...
    
    extern bool AltTrades = false;
    int lastTrade = 0;
    
    //.........
    //In signals
    
    int signal = 0;
          
        //   ------------> "code for signal generation"<-----------------
          
          
            
           
         if (AltTrades){ 
         if(OrdersHistoryTotal()>0){
             for(i=0;i<=OrdersHistoryTotal();i++){
                OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
                if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic){
                   lastprofit=OrderProfit();
                   lastlot=OrderLots();
                   if(OrderType()==OP_BUY){
                      
                      lastorder=1;
                   }
                   if(OrderType()==OP_SELL){
                      
                      lastorder=2;
                   }
                }
             }
          }
          
          if (signal == lastorder) signal = 0;
          
          }
    
    /..... atr dynamics, timefilter etc....
    Attached Files Attached Files

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

    Default

    Quote Originally Posted by Agentrfr View Post
    OK, here it is. Have fun


    @Funyoo

    Please can you include this code in your template. I have canabalized the code of martingale for it, but it is very effective.


    Code:
    //Initialization
    //...
    
    extern bool AltTrades = false;
    int lastTrade = 0;
    
    //.........
    //In signals
    
    int signal = 0;
          
        //   ------------> "code for signal generation"<-----------------
          
          
            
           
         if (AltTrades){ 
         if(OrdersHistoryTotal()>0){
             for(i=0;i<=OrdersHistoryTotal();i++){
                OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
                if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic){
                   lastprofit=OrderProfit();
                   lastlot=OrderLots();
                   if(OrderType()==OP_BUY){
                      
                      lastorder=1;
                   }
                   if(OrderType()==OP_SELL){
                      
                      lastorder=2;
                   }
                }
             }
          }
          
          if (signal == lastorder) signal = 0;
          
          }
    
    /..... atr dynamics, timefilter etc....
    Hi Agentrfr,

    Thanks for your participation.

    There is already the changedirection option that is working the same way.

  6. #6

    Default

    Quote Originally Posted by funyoo View Post
    Hi Agentrfr,

    Thanks for your participation.

    There is already the changedirection option that is working the same way.
    /facepalm

    Sigh. I've never had the thought to look at that code... I thought it had something to do with pending orders. Nevermind my request then

  7. #7

    Default

    Thanks all.
    i will try Live acc today.
    will report ASAP
    Thanks

    Note. Can you add a user input option to use either the trendmagic indicator or the supertrend indicator in this EA.

    please corrected me. if i wrong

    i add only

    Code:
    double LastCandleClose = iClose(NULL,0,1);
    double SuperTrend_Lime_1 = iCustom(NULL,0,"SuperTrend nrp mtf","Current time frame",0,shift);
    double SuperTrend_Red_1 = iCustom(NULL,0,"SuperTrend nrp mtf","Current time frame",1,shift);
    
    
     if (TendMagDown == EMPTY_VALUE && TendMagUp !=EMPTY_VALUE && WMAlineUp != EMPTY_VALUE && WMAlineDown == EMPTY_VALUE && BBMACDup != EMPTY_VALUE && BBMACDdown == EMPTY_VALUE && TudorUp != EMPTY_VALUE && LastCandleClose > SuperTrend_Lime_1|| LastCandleClose > SuperTrend_Red_1)signal = 1;
    if (TendMagDown != EMPTY_VALUE && TendMagUp ==EMPTY_VALUE && WMAlineUp == EMPTY_VALUE && WMAlineDown != EMPTY_VALUE && BBMACDup == EMPTY_VALUE && BBMACDdown != EMPTY_VALUE && TudorUp == EMPTY_VALUE && LastCandleClose < SuperTrend_Lime_1|| LastCandleClose < SuperTrend_Red_1)signal = 2;
    thanks
    Attached Files Attached Files
    Last edited by Trint; 06-09-2010 at 04:50.

  8. #8

    Default

    Im not at home now. Soon as I get home I will show you how to do that

  9. #9

    Default

    hi all
    i'm testing on demo with ecn broker but it seems that the ea doesn't modify stop loss (only take profit)

Similar Threads

  1. Cross Zero line
    By altoronto in forum MQL programming
    Replies: 2
    Last Post: 08-25-2009, 14:54

Tags for this Thread

broker, demo, ecn, funyoo, home, how to, indicator, live, martingale, mq4, nrp, profit, request, signal, stop, time, timefilter, 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
  •