RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Reflection Expand / Collapse
Message
Posted 3/6/2008 07:02:40 Post #4779
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
This system shows how you can use reflection to override the position manager / broker connection. This allows you to fill orders manually at whatever price you like. You can open and close a position on the same bar.

You should be very careful when using these methods. As this system demonstrates, it is possible to "cheat". This system does it by buying at the open price and selling at the close price, but only if the close is greater than the open.

Since this system accesses internal methods and fields of the position manager class, it may not work in future releases of RightEdge. Also, the trades created using this method will not show up in the system statistics until the next bar.

The system can be downloaded by clicking here

Posted 3/10/2008 12:47:04 Post #4813
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Hello Bill

We are currently working on migrating our big trading system to RE 1.2.

For our system we were using Reflection.

I have downloaded the reflection system from the above link but i can't compile it under 1.2
Is there a reflection system available that works with 1.2?

Thank you

Markus


P.S. it seems that under the above link you have an older version of Reflection to download. It is dated 4/20/07.
This can't be the new one.
Posted 3/11/2008 09:08:38 Post #4831
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
We don't have a reflection system for 1.2 yet.  I think we are done with making major changes, so I should be able to work on this soon.

Thanks,
Daniel

Posted 3/12/2008 18:16:31 Post #4855
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Attached is a version of the reflection system which works with RightEdge 1.2.  The way it works has changed somewhat, but I think it is easier to use overall.  Instead of creating a pending position and then filling the order on that position, you just do it in one step with CreatePosition.

Thanks,
Daniel

  Post Attachments 
Reflection1.2.cs (241 views, 5.71 KB)

Posted 3/13/2008 08:10:06 Post #4856
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Hello Daniel

I've Downloaded the Reflection System. I can compile it but when I try to run it I get an exception during the StartUp()

The Exception happens here:

Type posType = typeof(Position);
piPositionData = posType.GetProperty("Data", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if (piPositionData == null)
{
throw new RightEdgeError("Error reflecting Position.Data");
}

Any idea what this could mean?
Markus Seeli
Posted 3/13/2008 09:59:10 Post #4859
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Oops, it's an obfuscation issue.  For now, replace "Data" with "x6b73aa01aa019d3a".  In the next build we release you will need to change it back to "Data".

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, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:26pm

2005-2007 © RightEdge Systems