Basically what is needed to make it work is mostly already there.
Since primarily just need an abstract class to extend. Which we
arleady have the abstract strategy class... So you write all the java
code as you normally would for your strategy.. into a text file...
basically everyting you see in balancer.java well this would be saved
ina  text file. At the time to execute that strategy this code is read
from the text file, then compiled into a java class. This java class
is then loaded via reflection. Since it extended the abstract strategy
class you can then Cast this loaded class as type Strategy, now you
can call all the strategy functions as normal.. so not really much
would have to change in strategyrunner or anything like that.... most
of the code changes jsut need to be made to show list of strategies in
the directory.... then when the strategy is launched have it read that
strategy source in, compile... then load the class via reflection..
the rest of it is used exactly as its already implemented...

On Sep 9, 4:55 pm, FrostEngine <[EMAIL PROTECTED]> wrote:
> No, there would not be an intermediate language. The actual code for
> the strategies would remain Java. You can compile java into byte code
> on the fly. Granted you lose a SMALL amount of performance due to
> reflection, but nothing too significant.
>
> On Sep 9, 4:45 pm, nonlinear5 <[EMAIL PROTECTED]> wrote:
>
> > > What I propose is to allow strategy editing on the fly. Add in a basic
> > > text editor, perhaps some syntax highlighting... so far easy. Next
> > > step would be when you got o backtest, optimize, run the strategy
> > > whatever is required the strategy is simply compiled on the fly. This
> > > is actually not hard to implement.
>
> > This seems to me like a substantial effort. You would have to come up
> > with some sort of language to specify the entry/exit conditions, to
> > use indicators, and to do any intermediate calculations (if any).
> > Next, you would need an interpreter to translate this "special
> > language" script into Java and/or directly to byte code. This would
> > add a big, fat layer to JBT. Perhaps I am not following what you are
> > suggesting. The way I understand it is that you want to see an
> > equivalent of TradeStation's EasyLanguage in JBT?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to