|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStrategy
Interface that all strategies should implement
| Method Summary | |
|---|---|
void |
onAccount(IAccount account)
Called when account information update is received |
void |
onBar(Instrument instrument,
Period period,
IBar askBar,
IBar bidBar)
Called on every bar for every basic period and instrument that application is subscribed on |
void |
onMessage(IMessage message)
Called when new message is received |
void |
onStart(IContext context)
Called on strategy start |
void |
onStop()
Called before strategy is stopped |
void |
onTick(Instrument instrument,
ITick tick)
Called on every tick of every instrument that application is subscribed on |
| Method Detail |
|---|
void onStart(IContext context)
throws JFException
context - allows access to all system functionality
JFException - when strategy author ignores exceptions
void onTick(Instrument instrument,
ITick tick)
throws JFException
instrument - instrument of the ticktick - tick data
JFException
void onBar(Instrument instrument,
Period period,
IBar askBar,
IBar bidBar)
throws JFException
instrument - instrument of the barperiod - period of the baraskBar - bar created of ask side of the ticksbidBar - bar created of bid side of the ticks
JFException
void onMessage(IMessage message)
throws JFException
message - message
JFException
void onAccount(IAccount account)
throws JFException
account - updated account information
JFException
void onStop()
throws JFException
JFException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||