Boosting your profits – SET TARGET PROFIT 0. But how it works??
- This topic has 2 replies, 3 voices, and was last updated 7 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
Forums › ProRealTime English forum › General trading discussions › Boosting your profits – SET TARGET PROFIT 0. But how it works??
Hello,
I have a question. During developing some of my strategies I did by an accident set up once Profit to zero (SET TARGET PROFIT 0). I have realized that this has immediately boosted all my strategies profits during testing, but obviously this does not work in real trading (at least with IG). I have spent many hours studying this behavior and try to replicate the internal function “set target profit 0”, but without any success. I think it behaves to some extend as following:
It seems simple but I really was not able to get the same results as with the internal function. I have prepared a simple example (see below), you can try it on USD/JPY on daily timeframe. Then just switch on and off the last line “SET TARGET PROFIT 0”. You will see the incredible difference. Do you anyone have some idea why this setting does not work in real trading or is there a way to replicate it? I have contacted IG but they told me to write here. Thanks a lot for everyone trying to answer this, cheers!
Try on USD/JPY on daily timeframe, if you disable the last line (profit) you will see the big difference
Definition of code parameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Conditions to enter long positions indicator1 = Average[20](close) c1 = (indicator1 CROSSES OVER close) IF c1 THEN BUY 10 PERPOINT AT MARKET ENDIF // Conditions to exit long positions c2 = (indicator1 CROSSES UNDER close) IF c2 THEN SELL AT MARKET ENDIF // Conditions to enter short positions c3 = (indicator1 CROSSES UNDER close) IF c3 THEN SELLSHORT 10 PERPOINT AT MARKET ENDIF // Conditions to exit short positions c4 = (indicator1 CROSSES OVER close) IF c4 THEN EXITSHORT AT MARKET ENDIF // Stops and targets SET STOP pLOSS 2.75 SET TARGET PROFIT 0 |
ProBacktest doesn’t simulate what the broker server is interpreting with your “set target profit 0”. Obviously, in backtests it will behave differently, it is the same thing as putting stoploss order too close to the open price, or in the spread, it’s always your broker that will have the final word. It is not a bug, as Despair thought.