RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



New price method? Expand / Collapse
Message
Posted 2/10/2010 06:27:14 Post #10764
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Hello,

1) I'm just starting to understand how Rightedge works, and I understand the newbar method which is called when a new bar is complete.
I would like to backtest a forex system, for which I have 1 minute data (which is the shortest time frame data I have) and I assume that all prices from High to low of each bar are tradable.
The question I have is: In some cases my stop orders should be filled in the same bar that the buy/sell conditions are evaluated. For example my buy stop condition is "if price crosses 1.4958 then buystop at 1.5000", but the bar opens at 1.4950 and closes at 1.5005.
As I understand, if I use the newbar method the buystop order cannot be placed because the close of the bar has already passed the buystop price.
I know that I'm taking a decision based on the close of the bar which is not possible in live trading but this is the only way to do it in backtesting.
Is there any way to accomplish this in rightedge?

2) In "real time" my buy and sell conditions should be evaluated as a new tick arrives.
Which method should be called in this case instead of newbar method?

thanks a lot

 

Posted 2/10/2010 08:30:47 Post #10771
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
RightEdge will not really allow intra bar trades. You would need tick level data to have orders processed on the same bar. Now you can "fake" ticks meaning RightEdge will break a bar into 4 ticks, open, high, low, close. Then to evaluate orders on the tick level, override the NewTick method.

pmxgs0 (2/10/2010)
Hello,

1) I'm just starting to understand how Rightedge works, and I understand the newbar method which is called when a new bar is complete.
I would like to backtest a forex system, for which I have1 minute data (which is theshortest time framedata I have) and I assume that all prices from High to low of each barare tradable.
Thequestion I have is:In some cases my stop ordersshould befilled in the same bar that the buy/sell conditions are evaluated. For example my buy stop condition is "if price crosses 1.4958 then buystop at 1.5000", but the bar opens at 1.4950 and closes at 1.5005.
As I understand, if I use the newbar method thebuystop order cannotbe placedbecause the close of the barhas already passed the buystop price.
I know that I'm taking a decision based on the close of the bar which is not possible in live trading but this is the only way to do it in backtesting.
Is there any way to accomplish this in rightedge?

2) In "real time"my buy and sell conditions should be evaluated as a new tick arrives.
Which method should be called in this case instead of newbar method?


thanks a lot

Posted 2/10/2010 10:03:03 Post #10775
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
In that case what is the order that those "fake" ticks are generated ?
First tick = Open, 2nd =high, 3rd=low, 4th=close?

thanks

billb (2/10/2010)
RightEdge will not really allow intra bar trades. You would need tick level data to have orders processed on the same bar. Now you can "fake" ticks meaning RightEdge will break a bar into 4 ticks, open, high, low, close. Then to evaluate orders on the tick level, override the NewTick method.

pmxgs0 (2/10/2010)
Hello,

1) I'm just starting to understand how Rightedge works, and I understand the newbar method which is called when a new bar is complete.
I would like to backtest a forex system, for which I have1 minute data (which is theshortest time framedata I have) and I assume that all prices from High to low of each barare tradable.
Thequestion I have is:In some cases my stop ordersshould befilled in the same bar that the buy/sell conditions are evaluated. For example my buy stop condition is "if price crosses 1.4958 then buystop at 1.5000", but the bar opens at 1.4950 and closes at 1.5005.
As I understand, if I use the newbar method thebuystop order cannotbe placedbecause the close of the barhas already passed the buystop price.
I know that I'm taking a decision based on the close of the bar which is not possible in live trading but this is the only way to do it in backtesting.
Is there any way to accomplish this in rightedge?

2) In "real time"my buy and sell conditions should be evaluated as a new tick arrives.
Which method should be called in this case instead of newbar method?


thanks a lot

Posted 2/10/2010 11:15:25 Post #10782
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
For the fake ticks, the open will be first and the close will be last. You can actually control whether the high or low comes first. Right click on the root node of the project tree, click on properties, click on the Simulation tab, and check or uncheck the "Analyze High Before Low" option.

You can use the NewTick method to process ticks.

We also do have the option to let you look at the close value and still have a chance to trade at that price. See the SystemData.EnableTradeOnClose property and the SystemData.BarClosing event if you need this (which it sounds like you might not).

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 3:17pm

2005-2007 © RightEdge Systems