My solution just changes the global mode to forward test mode and
closes the positions
within that particular strategy. Since I never traded more than one
strategy at
a time, it works fine for me. Now, for your case, off the top of my
head, a
hack solution would be to have the button call a method
on your strategy which sets a flag that prevents and trades after
closing the position. A more elegant hack would be to bake that
functionality
into the Strategy base class and then the execution engine could then
read that
attribute and trade/ not trade on an individual basis. Maybe call
this isDailyStop.
Which would be usefull not only by GUI invokation but also
programmatic.
The best way to do it, IMHO, is to eliminate the global "mode"
setting and replace it with a mode setting
at the Strategy level and fold this change into the architecture of
JArbitrager
(the execution engine , UI , profit manager ,backtester, etc). The
architectural change
should not be to bad, but it needs to be examined.
On Sep 29, 3:28 pm, Astor <
astorel...@yahoo.com> wrote:
> Thanks. I did add a button "stop trading" to the jArbitrager but can not seem to
> find the right method to associate with the button. strategy.closePosition()
> does not do the job, nor does "setIsActive(false)" nor setting the "mode" to
> something other than "trade", e.g "forward test", because it is\ global, as you
> had pointed out. I must be overlooking some method.
>
> ________________________________
> From: bubbleRefuge <
jn.crichton.mccutch...@gmail.com>