Super Money Grid w/D'Alembert Progression and Unbalance Control GBP/USD

Discussion in 'Forex' started by ElectricSavant, Jan 15, 2012.

  1. What does this chunk of code mean? Is this the D'Alembert thingy?


    / ------------------------------------------------------------------------------------------------
    // SORT BY LOTS
    // ------------------------------------------------------------------------------------------------
    void SortByLots()
    {
    int aux_tickets;
    double aux_lots, aux_profit, aux_price;

    // We are going to sort orders by volume
    // m[0] smallest volume m[size-1] largest volume

    // BUY ORDERS
    for(int i=0; i<buys-1; i++)
    {
    for(int j=i+1; j<buys; j++)
    {
    if (buy_lots>0 && buy_lots[j]>0)
    {
    // at least 2 orders
    if (buy_lots[j]<buy_lots)
    {
    // sorting
    // ...lots...
    aux_lots=buy_lots;
    buy_lots=buy_lots[j];
    buy_lots[j]=aux_lots;
    // ...tickets...
    aux_tickets=buy_tickets;
    buy_tickets=buy_tickets[j];
    buy_tickets[j]=aux_tickets;
    // ...profits...
    aux_profit=buy_profit;
    buy_profit=buy_profit[j];
    buy_profit[j]=aux_profit;
    // ...and open price
    aux_price=buy_price;
    buy_price=buy_price[j];
    buy_price[j]=aux_price;
    }
    }
    }
    }

    // SELL ORDERS
    for(i=0; i<sells-1; i++)
    {
    for(j=i+1; j<sells; j++)
    {
    if (sell_lots>0 && sell_lots[j]>0)
    {
    // at least 2 orders
    if (sell_lots[j]<sell_lots)
    {
    // sorting...
    // ...lots...
    aux_lots=sell_lots;
    sell_lots=sell_lots[j];
    sell_lots[j]=aux_lots;
    // ...tickets...
    aux_tickets=sell_tickets;
    sell_tickets=sell_tickets[j];
    sell_tickets[j]=aux_tickets;
    // ...profits...
    aux_profit=sell_profit;
    sell_profit=sell_profit[j];
    sell_profit[j]=aux_profit;
    // ...and open price
    aux_price=sell_price;
    sell_price=sell_price[j];
    sell_price[j]=aux_price;
    }
    }
    }
    }
    }
     
    #21     Jan 17, 2012
  2. For you folks that read code...You will notice that great pains have been taken to make sure that the EA loops itself through a routine (I have not seen this code before) to insure good executions. It is called "Order Reliable".

    If anything...you EliteCoders™ can take that chunk of code away with you and copy and paste it into your library of code to use on other EA's...Your welcome and Thank-You for reading. I cannot post the chunk here for you as it is too long.

    I am going to bed and get some sleep now.

    ElectricDoesNotKnowJackAboutCodeSavant
     
    #22     Jan 17, 2012
  3. I just went live on my $500 account with the maximum lot sizes available. :D

    J/K...running 3 pairs on demo with no lot size progression.
     
    #23     Jan 17, 2012
  4. Come here LCFX...right here...Slap!

    [​IMG]


     
    #24     Jan 17, 2012
  5. some action...(notice that there is a D'Alembert progression in the trail of sells) I wonder how & when the unbalance control kicks in?

    Start Capital: $4,000.00
    # of Calendar Days Traded: 3 (Start = 01/15/12)
    Profit: $11.58
    Float: -$20.78
    NAV: -$9.20 Percent: -0.23%
    Margin Used: $15.38

    [​IMG]
     
    #25     Jan 18, 2012
  6. There is a lot less trading with these wider grids. This system is not the pure martingale that I thought it was. The way the trades are placed are to hold the grids close enough to allow exits and resets during strong trends. I must say I am more impressed with this as it continues to trade and seems to be safer than what I thought. I am in hopes to be able to publicly experience a huge move in the GBP/USD to see what happens.

    The D'Alembert progression is used on the trail of sells and the unbalance control or the D'Alembert is being used on the buy for the trend on the way up (I am not sure which one is being used). Notice the buy was 0.02 lots. I will know shortly more about this EA if the trend continues to go up.

    I have a hard time to remember that this is a test. I want to win ...but I really want very hard conditions to be presented to this EA.

    So to recap the events of the last 4 days. We are experiencing an upward trend causing the EA to place single buy trades (I think the logic of unbalance control is here) and then close them while accumulating sells in a progressive D'Alembert fashion. Being that this is a progression I am keeping an eye on margin used and reporting it below. What I hope for during extended trends is for enough of a reversal to take out the trail of orders being left behind (a reset).

    Thank You for reading.

    Start Capital: $4,000.00
    # of Calendar Days Traded: 4 (Start = 01/15/12)
    Profit: $16.98
    Float: -$75.66
    NAV: -$58.68 Percent: -1.47%
    Margin Used: $24.68

    [​IMG]
     
    #26     Jan 19, 2012
  7. There is sort of a vocabulary used in Grid Trading.
    • Boundries
    • Grid Space
    • Grid Size
    • Progressive Grid Space
    • UPL
    • Trail
    • UnBalance
    • Reset
    • Progression
    • Range
    • Gridding
    • suck the grids close
    • goose the progression
    • Midpoint
    • Danglers
    • Electric is a Dreamer
    • MiniGrid
    • Partial Grid
    • Hedged Grid
     
    #27     Jan 19, 2012
  8. Another view:

    [​IMG]
     
    #28     Jan 19, 2012
  9. another analysis:

    [​IMG]
     
    #29     Jan 19, 2012
  10. I took Friday afternoon off! So I am a little late posting these last two trades (1 additional trailing sell was added and the close of the earlier 0.02 buy order)...Notice that an additional buy order of 0.03 (progression) was placed in case the cable continues to trend upwards. This is a complicated code when utilizing both D'Alembert and unbalance control.

    The dealer had some downtime problems and there was a gap in the chart...Welcome to Retail Spot Forex and MT4.

    Start Capital: $4,000.00
    # of Calendar Days Traded: 6 (Start = 01/15/12)
    Profit: $29.98
    Float: -$182.58
    NAV: -$152.60 Percent: -3.82%
    Margin Used: $37.13

    [​IMG]
     
    #30     Jan 21, 2012