martingale, need little help
- This topic has 20 replies, 3 voices, and was last updated 7 years ago by .
Similar topics:
Forums › ProRealTime English forum › ProOrder support › martingale, need little help
you wrote
Your code is From 6 in the afternoon of Tuesday to 9 in the morning of Thursday, would not it be better from 9 in the morning of Tuesday to 6 in the afternoon of Thursday?
…. No! i tested all timeconstellations, timeframe 1 H und timeframe 4 H
these times i use bring the best results in backtest
you wrote
“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?”
Whats that? the whole is like from 1 to 2 positionsize? and not from 1.1 to 1.2 ?
i understand correct?
Whats that? the whole is like from 1 to 2 positionsize? and not from 1.1 to 1.2 ?
Yes, this is correct, lot/contracts are always round number, so doing calculation to get the same gain in money with the same points objectives is almost impossible.
So we have to work with this fact. Only the infinitely money must be more. No problem whatsover.
Can you code? please?
the code will be used as an example/code base/compenent
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
// OriginalTrade without martingale, with positiv results in prt backtest 4H german 1 Eur mini MA1 = Average [1] MA2 = Average [2] c1 = Ma1>MA2 t1 = time = 180000 t2 = time = 090000 d1 =dayofweek = 2 d2 = dayofweek = 4 If d1 And t1 and c1 THEN buy 1 Contract At Market Endif If d2 and t2 then sell at market endif Set Stop PLoss 60 // from Trade Set Target PProfit 150 // from Trade |
And now the martingale to integrate (not correct code lines, sure, i m absolute beginner, hope you can understand what i want to use)
// work with 10 contracts (lots) // to clear nearly the-round-number-problem
Set Sop PLoss 600
Set Target StrategyProfit = 1500 points
at first Set StrategyProfit = 0
If after first trade strategyprofit <0 then// (example: after first trade = – 60 with 1 contact, – 600 with 10 contracts set positionsize new
= corrrect postionsize to get: the Target StratgegyProfit + the loss from first trade (1500+600) 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 (1500+600+600) and so again again until
IF StrategyProfit = 1500 or StrategyProfit = – 1500 Then
Quit
Can you code this?
Find exclusive trading pro-tools on