martingale, need little help

Forums ProRealTime English forum ProOrder support martingale, need little help

Viewing 15 posts - 1 through 15 (of 21 total)
  • #23981

    Looking for  a little help with martingale

    Martingale Pyramid should be stop at last at reached final a fixed profit of (maybe) 100 dollar

     

    small strategie before integrate the martingale

    IF TEMA [1) crosses over TEMA [4] then

    buy 1 contract at market

    Endif

    Set target $profit 100

    Set stop $loss 10

     

    And now the martingale to integrate (not correct code lines, sure, i m absolute beginner, hope you can understand what i want to use)

    Target StrategyProfit 100 Dollar

    at first Set StrategyProfit = 0

    If after first trade strategyprofit <0 then// (after first trade = – 10)

    set positionsize new = corrrect postionsize to get: the Target StratgegyProfit + the loss from first trade (100+10)

    then start trade again

    If second trade loss so do again

    find correct positionsize to get : the Target StratgegyProfit + the loss from first + loss from second trade (100+10+10)

    and so again again until

    IF StrategyProfit = 100 or StrategyProfit = – 100 Then

    Quit //strategy

    In this way above you win sometime 100 Dollar or you losse 100 Dollar (but not more, and the danger of martingale is limited

    result: + 100 dollar you have won

    result: – 100 dollar you strategy isn´t quite good

     

    all numbers above are examples to variabel at any strategy

    Can understand? Can help?

     

    kind johnscher

    #24152

    In order to calculate properly the lot for each trade, the target and stop must be set in points instead of money:

    I can make a code snippet for this of course, but be aware that lot size are always rounded up to the next whole number so you’ll never get the exact same profit/loss in money than your last trade, is it a problem?

     

    #24388

    so i thank you very much. I m happy that you help me.

    So lets begin.

     

    And now: please integrate the martingale. little bit more complex then my first question

    Once  StrategyProfit = 0

    Set Stop Loss StrategyProfit = 600 points // from Strategy !

    Set Target StrategyProfit = 1.500 points // from Strategy !

     

    in this new more compexer way, new codelines needed

    If the TradeProfit from first trade > 0 = then

    cumulate the winnings to StrategyProfit And start OriginalTrade again

    Endif

     

    If after first trade the TradeProfit < 0 then

    cumulate the Losses to StrategyProfit And Start OriginalTrade again with PostionSize(new) to reach the Target TradeProfit // to find the Positionsize(new) is one codingproblem, i told

    Endif

     

    If the TradeProfit from second trade > 0 = then

    cumulate the winnings to StrategyProfit And start OriginalTrade again

    Endif

    If after second trade the TradeProfit < 0 then

    cumulate the Losses to StrategyProfit And Start OriginalTrade again with PostionSize(new) to reach the Target TradeProfit // to find the Positionsize(new) is one codingproblem, i told

    Endif

    and so one and so one and so and so to : n-trade

    Stops and Targets see above

     

    IF StrategyProfit = -600 Or + 1.500 points Then

    Quit Strategy

    Endif // Last If Endif makes Stop PLosses and Target PProfits of the Strategy redundant but more stringent

     

     

    Understand? Can help?

    the OriginalTrade in PRT Backtest is positiv, testet 15.000 units (backt to 23.01.15 to yet,  included up and down in dax 1 euro)

     

    kind regards

     

     

     

     

    #24389

     

    #24390

    Martingale sooner or later fails, would only work with infinite money.

    #24391

    You wrote:

    “I can make a code snippet for this of course, but be aware that lot size are always rounded up to the next whole number so you’ll never get the exact same profit/loss in money than your last trade, is it a problem?”

    … not at yet

    .. not at yet spread tooo

    ..  not at yet brokerage few  tooooo

    … comes later

    #24392

    Martingale sooner or later fails, would only work with infinite money.

    .. i m german with small intelligent i can not understand correkt what you mean?

     

    #24393

    You can work from this code

    #24394

    it seems like only double, but this not i want

    #24395

    i try again to understanding

    wait a minute

    #24400

    A question, the robot starts on Tuesday at 6:00 p.m. and finish on Thursday at 9:00 p.m.?

    Does not it make more sense?

     

     

    #24401

    example

    first trade = – 30 points

    to reach the trade profit of second trade von 150 points the correct new positionsize must be not a double like *2 but rather

    1 point plus x points to egalisize the losses from first trade

    origin target = 150 points plus 30 points losses = 180 points

    180/150 = x/1

    180/150 = 1.2

    Postionsize(new) = 1.2 (is not double)

     

    second trade loos 40 points

    the correct posistionssize(new) of third trade is:

    losses from first trade = 30 plus losses from second trade= 40 points plus 150 target = 220 points

    220/150 = x/1

    x = 1,47 (is not double)

    and so one to : n-trade

     

    can you coded this?

     

    #24402

    you wrote:

    A question, the robot starts on Tuesday at 6:00 p.m. and finish on Thursday at 9:00 p.m.? Does not it make more sense?

     

    … 18.00 = 6 afternoon/evening

    = 09.00 = in the morning

     

    is time system

    also works monday short tuesday to spezial times

    = popular tradingssystem of a spezial community

    #24403

    works just in dax

    #24404

    i tested

    yeah, works too. postiv in backtest 4H timeframe, tested only day, 10.000 units

Viewing 15 posts - 1 through 15 (of 21 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login