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?
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
“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 ?
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
Ifd1Andt1andc1THEN
buy1ContractAtMarket
Endif
Ifd2andt2then
sellatmarket
endif
Set StopPLoss60// from Trade
Set TargetPProfit150// 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
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok