Page 51 of 54 FirstFirst ... 414950515253 ... LastLast
Results 501 to 510 of 539
  96 96 Attachment(s)    

Thread: vForce Like EA

  1. #501
    Junior Member
    Join Date
    May 2009
    Posts
    28

    Default Magic Number

    Hi Funyoo,

    I was wonder what is the difference if i use 1st vForce v1 to open 2windows (1buy only & 1 sell only) with difference magic number and another one with 2 windows difference magic number?

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

    Default

    Quote Originally Posted by Elma View Post
    Hi Funyoo,

    I was wonder what is the difference if i use 1st vForce v1 to open 2windows (1buy only & 1 sell only) with difference magic number and another one with 2 windows difference magic number?
    Hi Elma,

    Different magic numbers are only needed if you attach the EA to a same chart of a same pair with different settings.

  3. #503

    Default

    Quote Originally Posted by TradeHound View Post
    Thanks for the EA fix

    TradeHound
    Quote Originally Posted by bt2 View Post
    Its only the "StoM<StoS" fix corrected in the sell tests, about halfway down the code.


    if(
    ((OnlyAtStochSignal==false && StoM>StoS) || (OnlyAtStochSignal && StoMa<StoSa && StoM>StoS ))
    && ((OnlyAtRSISignal==false && RSI>RSILevel) || (OnlyAtRSISignal && RSIa<RSILevel && RSI>RSILevel ))
    && ((OnlyAtADXSignal==false && ADXP>ADXM) || (OnlyAtADXSignal && ADXPa<ADXMa && ADXP>ADXM ))
    && ((OnlyAtBearsSignal==false && Bears>0) || (OnlyAtBearsSignal && Bearsa<0 && Bears>0 ))
    && ((OnlyAtBullsSignal==false && Bulls>0) || (OnlyAtBullsSignal && Bullsa<0 && Bulls>0 ))
    && ((OnlyAtMacdSignal==false && MacdM>MacdS) || (OnlyAtMacdSignal && MacdMa<MacdSa && MacdM>MacdS ))
    && ((OnlyAtROCSignal==false && ROC>0) || (OnlyAtROCSignal && ROCa<0 && ROC>0 ))
    && ((OnlyAtBBSignal==false && Close[i]>BBands) || (OnlyAtBBSignal && Close[i+1]<BBandsa && Close[i]>BBands ))
    )BUY="true";
    if(
    ((OnlyAtStochSignal==false && StoM<StoS) || (OnlyAtStochSignal && StoMa>StoSa && StoM<StoS )) // fixed 1st ">" to "<"
    && ((OnlyAtRSISignal==false && RSI<RSILevel) || (OnlyAtRSISignal && RSIa>RSILevel && RSI<RSILevel ))
    && ((OnlyAtADXSignal==false && ADXP<ADXM) || (OnlyAtADXSignal && ADXPa>ADXMa && ADXP<ADXM ))
    && ((OnlyAtBearsSignal==false && Bears<0) || (OnlyAtBearsSignal && Bearsa>0 && Bears<0 ))
    && ((OnlyAtBullsSignal==false && Bulls<0) || (OnlyAtBullsSignal && Bullsa>0 && Bulls<0 ))
    && ((OnlyAtMacdSignal==false && MacdM<MacdS) || (OnlyAtMacdSignal && MacdMa>MacdSa && MacdM<MacdS ))
    && ((OnlyAtROCSignal==false && ROC<0) || (OnlyAtROCSignal && ROCa>0 && ROC<0 ))
    && ((OnlyAtBBSignal==false && Close[i]<BBands) || (OnlyAtBBSignal && Close[i+1]>BBandsa && Close[i]<BBands ))
    )SELL="true";


    The same little piece as funyoo originally fixed in his v202.

    cheers bt2
    Originally Posted by RConcu
    Post #462
    Hi Maxim, hi funyoo,

    great work, great EA. I like it.

    i found the reason why the EA does no short orders.

    Put in the code in red:

    int openSellOrder( int barIndex )
    {
    double stopLoss = calculateSellStopLoss( barIndex ),
    takeProfit = calculateSellTakeProfit( barIndex ),
    orderOpenPrice,
    // The order size of both orders
    orderSize,
    // order1Size
    order1Size = g_order1Size,
    // order2Size
    order2Size = g_order2Size;


    Hi Guys

    I've tried Funyoo's version 202 and it doesn't seem profitable. Maxim's version 2_04 is profitable on the long trades but doesn't make short trades. I've adjusted the code as advised in the above two posts but 2_04 is still only trading long.

    Can anybody help?

    Cheers.

  4. #504

    Cool FunYooSalad v1.0 -- EA Formerly Known as vForce Like EA

    OK, here is my refactoring of the vForce Like EA, based on Maxim's code, but with the selling bug fixed, and a few others.

    It makes money buying, it makes money selling... it's impressive!

    However, beware the Head and Shoulders Reversal Pattern, as this algorithm bets wrong on that, buying the left shoulder, losing on the right. The proper StopLoss setting should help there, since it will now sell the downside and start making money again if a down trend develops.

    BE CAREFUL!!

    BTW, I've been using it on EURUSD M5 or M15 chart. Works with 5 digit and 4 digit brokers.

    MM
    Attached Files Attached Files

  5. #505

    Default

    Quote Originally Posted by MusicMan View Post
    OK, here is my refactoring of the vForce Like EA, based on Maxim's code, but with the selling bug fixed, and a few others.

    It makes money buying, it makes money selling... it's impressive!

    However, beware the Head and Shoulders Reversal Pattern, as this algorithm bets wrong on that, buying the left shoulder, losing on the right. The proper StopLoss setting should help there, since it will now sell the downside and start making money again if a down trend develops.

    BE CAREFUL!!

    BTW, I've been using it on EURUSD M5 or M15 chart. Works with 5 digit and 4 digit brokers.

    MM
    Hi Music Man

    Thank you for this new variation. A couple of queries:

    1. The TS doesn't appear to work. All orders are initiated with a TP (see extract of test below):

    59 2009.02.02 01:30 t/p 11 0.08 1.2720 1.2868 1.2720 12.00 10057.00
    60 2009.02.02 01:30 t/p 12 0.02 1.2720 1.2868 1.2720 3.00 10060.00
    61 2009.02.02 03:40 t/p 3 0.08 1.2714 1.2860 1.2714 12.00 10072.00
    62 2009.02.02 03:40 t/p 4 0.02 1.2714 1.2860 1.2714 3.00 10075.00
    63 2009.02.02 03:51 t/p 21 0.08 1.2713 1.2862 1.2713 12.00 10087.00
    64 2009.02.02 03:51 t/p 22 0.02 1.2713 1.2862 1.2713 3.00 10090.00
    65 2009.02.02 03:51 t/p 1 0.08 1.2712 1.2854 1.2712 12.00 10102.00
    66 2009.02.02 03:51 t/p 2 0.02 1.2712 1.2854 1.2712 3.00 10105.00
    67 2009.02.02 03:51 t/p 19 0.08 1.2711 1.2862 1.2711 12.00 10117.00
    68 2009.02.02 03:51 t/p 20 0.02 1.2711 1.2862 1.2711 3.00 10120.00
    69 2009.02.02 06:55 t/p 23 0.08 1.2710 1.2853 1.2710 12.00 10132.00
    70 2009.02.02 06:55 t/p 24 0.02 1.2710 1.2853 1.2710 3.00 10135.00
    71 2009.02.02 06:59 t/p 15 0.08 1.2709 1.2849 1.2709 12.00 10147.00
    72 2009.02.02 06:59 t/p 16 0.02 1.2709 1.2849 1.2709 3.00 10150.00

    2. Also, at one stage during my backtest, the green equity line shot up more than 10% over the balance line before shooting back down a few trades later. I don't understand this, if fixed TPs are being loaded on each trade then the majority of increases in equity should be captured. Can anybody explain? (I'm afraid I haven't worked out how to copy and paste an image in the posts!).

    Many thanks.

  6. #506

    Cool

    Yes, the dynamic order management features seem to have gotten lost in the mix somewhere. Let me see if I understand what it is supposed to do, then we will see if I can get it to work in a partially undocumented language with no source-code debugger.

    1) Every signal places 2 orders, the relative size of which is dictated by EA params (defaulted to 80%/20% of Lots).

    2) Order 1 gets a TP value according to EA params. Order 2 gets no TP.

    3) Order 2 has its TS dynamically modified to follow behind as the order gets into profit.

    Although I don't see it in the original, I think we also ought to add the following:

    4) Order 2 dynamic TS modification does not proceed until the order has exceeded a specific profit amount (or perhaps state this in pips).

    Does that about sum up what the TS feature ought to do?

    I am not mentioning the formula for computing the TS on purpose, as the original ATR-based approach is a given, I guess.

    MM

  7. #507

    Default

    Quote Originally Posted by MusicMan View Post
    Yes, the dynamic order management features seem to have gotten lost in the mix somewhere. Let me see if I understand what it is supposed to do, then we will see if I can get it to work in a partially undocumented language with no source-code debugger.

    1) Every signal places 2 orders, the relative size of which is dictated by EA params (defaulted to 80%/20% of Lots).

    2) Order 1 gets a TP value according to EA params. Order 2 gets no TP.

    3) Order 2 has its TS dynamically modified to follow behind as the order gets into profit.

    Although I don't see it in the original, I think we also ought to add the following:

    4) Order 2 dynamic TS modification does not proceed until the order has exceeded a specific profit amount (or perhaps state this in pips).

    Does that about sum up what the TS feature ought to do?

    I am not mentioning the formula for computing the TS on purpose, as the original ATR-based approach is a given, I guess.

    MM
    Yes, that's the theory. But what is actually happening is that order 2 is given the same TP as order one, so the TS, if it exists, never gets a chance to show itself.

    What you are suggesting is correct, but we first of all need to prevent order 2 from loading a TP.

    Thanks for your interest.

    Paul

  8. #508
    Junior Member
    Join Date
    Apr 2009
    Posts
    1

    Default

    If that is the problem, I think we need to modify the OrderSend parameter for ticket2 (sell or buy).

    If you look at the current openSellOrder subfunction as example:
    Code:
    ticket1 = OrderSend( instrument, OP_SELLSTOP, g_order1Size, orderOpenPrice, Slippage, stopLoss, takeProfit, EAName, Magic1, expire, g_colorShort );
    ...
    ticket2 = OrderSend( instrument, OP_SELLSTOP, g_order2Size, orderOpenPrice, Slippage, stopLoss, takeProfit, EAName, Magic2, expire, g_colorShort );
    That is where the TP is set even for order #2. What we should do is to remove TP from order #2, like this:
    Code:
    ticket1 = OrderSend( instrument, OP_SELLSTOP, g_order1Size, orderOpenPrice, Slippage, stopLoss, takeProfit, EAName, Magic1, expire, g_colorShort );
    ...
    ticket2 = OrderSend( instrument, OP_SELLSTOP, g_order2Size, orderOpenPrice, Slippage, stopLoss, 0, EAName, Magic2, expire, g_colorShort );
    Same must be done to openBuyOrder subfunction.

    One more thing, why is the Expiration set to 0? If not mistaken, vforce has expiration so that any pending orders that are not executed within the specified timeframe will be deleted. Any reason why expiration rule not followed now?

    Thanx.

    -RJ1-

    Quote Originally Posted by redrag View Post
    Yes, that's the theory. But what is actually happening is that order 2 is given the same TP as order one, so the TS, if it exists, never gets a chance to show itself.

    What you are suggesting is correct, but we first of all need to prevent order 2 from loading a TP.

    Thanks for your interest.

    Paul

  9. #509

    Cool

    >>expiration

    I believe someone disabled it because it was causing runtime errors. I haven't addressed that feature as of yet.

    At some point soon, I will see if I can get it to work. I hate having all those old pending orders laying around when the market moves away from them.

    MM

  10. #510
    Junior Member
    Join Date
    May 2009
    Posts
    28

    Default

    Hi Funyoo,

    I'm currently testing on VForce v1.2.
    When i analise the buy and sell from the chart i noticed that vForce usually will place a trade near to peak or valley of the trend and hanging there for another new peak or valley.
    Can we modify the code so that it will trade reverse order so that it will place a sell on peak and buy on the valley?

Similar Threads

  1. vForce Like EA v2
    By funyoo in forum Expert advisors live statements
    Replies: 113
    Last Post: 10-21-2013, 19:59
  2. VForce Like EA v1.1
    By fxrobot in forum Expert advisors live statements
    Replies: 5
    Last Post: 08-29-2009, 15:15
  3. vForce EA Great Trading System
    By iForex in forum Ideas for expert advisors
    Replies: 5
    Last Post: 06-16-2009, 16:00

Tags for this Thread

100, advisor, alpari, alpari uk, analysis, automated trading, automatic, average, backtest, backtesting, bonus, breakeven, broker, brokers, change, closing, coding, color, comparison, copy, correlation, demo, design, divergence, eas, elite, eur, eur/usd, eurjpy, eurusd, expert, expert advisor, experts, forex, free, fxopen, gbpusd, hedging, high, historical, home, how to, indicator, indicators, learn, live, live account, low, magic, magic number, main, managed, manual, manual trading, metatrader, moving average, mq4, mql, mt4, mt5, offer, parabolic sar, power, price action, profit, profitable, programmer, programming, rating, real, research, review, robot, robots, rsi, sales, sells, server, signal, signals, simple, slippage, spread, stoch, stochastic, stop, stoploss, strategy, support, system, test, thank you, time, trader, trading, trading forex, trading system, trading volume, trailing, 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
  •