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:
If you are at some point profitable and then
your profit becomes less than 0 and then
you are about to become again profitable (so you going to reach Limit 0)
Exit with being even
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
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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue