Wednesday, February 3, 2010

Non Stop Gas Gasx Doesnt Work

Troubleshooting - isnewday ()

Before the next weeks with more specific issues is a mistake short quiz. Today I started trading the same strategy at 3 markets, which I tried hei0t habs. By a code change, only one market was trading, although signals available for all three were. 2 markets had I acted schonmal parallel with a strategy, but 3? Should it be because, or at least with this code:

code from the strategy to determine if a new day has begun. It is a variable schonGetradet (back), so that I can ensure that every day is definitely just a trade run:












code UserDefinedMethods . cs to manage in a top class central methods that can use all the strategies. Here is the called by the subclass Method isnewday () implemented:

















Where is the error and why is only one market traded and not all 3 signals, which it yesterday and today was the same strategy? There can


The resolution is the next day, who would like to advise :-)

Best regards
darth trader


and RESOLUTION UPDATE:

Gerd is right newDay is a class variable and an instance variable. Therefore, it exists only once. In addition, it is declared private and will not therefore inherited with. A declaration of

protected int = -1 newDay

could solve the problem. However, I have chosen the safer option and my code was changed back to this ...

if (ToDay (Time [0])! = Today (Time [1])) {... }

... to avoid further errors at first.

for advanced in terms of programming: Certainly there are situations in which the error variation from the top of more than one strategy may be called, but sure it is not. Keyword is "thread safety", because the above code is not synchronized (vorr. in C #, it is similar to Java :-)

0 comments:

Post a Comment