RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Enter on open and exit on close Expand / Collapse
Message
Posted 6/19/2009 06:27:08 Post #8845
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I've just started to use Right Edge and I find it a little bit too simplistic. I have used OpenQuant before which has methods for different events on a bar, e.g. open and close. This works well for me as I would like to test some simple strategies where I enter on open and exit on close of a bar. Is it possible to do this in RE as well, as I haven't been able to figure it out yet.

Thanks
Posted 6/19/2009 07:36:35 Post #8846
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
Not easily done with Edition 1, however, with Edition 2, the bars are broken apart into ticks where 4 ticks would be sent per bar (Open, High, Low, Close). So in that case you'd handle NewTick and you'd keep track of which tick came through and process.

Off the top of my head, something like;

int tickCount = 1;

public void override NewTick(Symbol symbol, BarData partialBar, TickData tick)
{
if (tickCount == 1)
{
// This is my opening price tick
}

if (tickCount == 4)
{
// this is my closing price tick.
}

tickCount++;
}

public void override NewBar()
{
// Reset the counter now that we've received a full bar
tickCount = 1;
}

clawson84 (6/19/2009)
I've just started to use Right Edge and I find it a little bit too simplistic. I have used OpenQuant before which has methods for different events on a bar, e.g. open and close. This works well for me as I would like to test some simple strategies where I enter on open and exit on close of a bar. Is it possible to do this in RE as well, as I haven't been able to figure it out yet.

Thanks
Posted 6/30/2009 12:54:41 Post #8912
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Thanks for your help,

I've tried to implement a function with the same signature that you've given in the sample but I get a compile error as follows.

I'm using Edition 2 Build 11

Error 'MySymbolScript.NewTick(RightEdge.Common.Symbol, RightEdge.Common.BarData, RightEdge.Common.TickData)': no suitable method found to override c:\XXXXXXXXX.cs 84
Posted 6/30/2009 17:11:36 Post #8917
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
This override would have to be at the System level, not the SymbolScript level. To do something similar at the SymbolScript level, tap into NewTick.

clawson84 (6/30/2009)
Thanks for your help,

I've tried to implement a function with the same signature that you've given in the sample but I get a compile error as follows.

I'm using Edition 2 Build 11

Error 'MySymbolScript.NewTick(RightEdge.Common.Symbol, RightEdge.Common.BarData, RightEdge.Common.TickData)': no suitable method found to override c:\XXXXXXXXX.cs 84
Posted 9/18/2009 11:58:24 Post #9513
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Why, when CreateTicksFromBars is set to true, the tickType enumeration is set always to Trade instead of PriceOpen, PriceLow, PriceHigh, PriceClose respectively for four ticks representing one bar?
Posted 9/18/2009 12:09:25 Post #9514
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
vanSant (9/18/2009)
Why, when CreateTicksFromBars is set to true, the tickType enumeration is set always to Trade instead of PriceOpen, PriceLow, PriceHigh, PriceClose respectively for four ticks representing one bar?


Well, we try to design RightEdge so that the same systems will work for backtesting and live mode. In live mode you will be getting trade ticks, not OHLC ticks, so it does the same in backtest mode. We have tick types for HighPrice, LowPrice, OpenPrice, and PreviousClose, but these are there so that these values can be displayed in the live data window, and aren't really meant to be used by the system.

Thanks,
Daniel
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 5:57am

2005-2007 © RightEdge Systems