Profile Picture

Accessing Scan Results

Posted By benzeen 3 Years Ago
Message
Posted Thursday June 26 2014
I am trying to send an email during the system shutdown which contains the Scan results from a specific run. I have no problem with the email send etc... with generic content... but now I am in need of a little programming assistance to get the Scan results from the run. I am a VB user (but can probably muddle through a C+ answer Wink )...can anyway show me generic code how I might get each scan result (would need to know symbol, order price and shares).

All help is greatly appreciated! Smile

Best
Posted Friday June 27 2014
The scan results are simply the open orders at the end of the simulation.

You can get the positions for these orders by calling SystemData.PositionManager.GetPendingPositions() and SystemData.PositionManager.GetOpenPositions(), and then get the pending orders for a position with the Position.Orders property.

Does this help?

Thanks,
Daniel
Posted Saturday June 28 2014
Great help. Thank you!!

I think the one thing that would help me (and maybe it exists, but I am missing it) is whether there is a complete diagram/schematic/list of classes and related functions etc... such that I could probably work out relatively simple questions like that.

Cheers again!
Posted Sunday June 29 2014
There's not a diagram, but you can browse the available APIs and view their documentation in the RightEdge Developer API Reference. There's a link to it in the start menu.

Thanks,
Daniel
Posted Tuesday July 08 2014
Daniel
That is exactly what I was looking for, I can't believe that I didn't look there! Smile

Thanks again!
BZ
Posted Thursday September 22 2016

You can get the positions for these orders by calling SystemData.PositionManager.GetPendingPositions() and SystemData.PositionManager.GetOpenPositions(), and then get the pending orders for a position with the Position.Orders property.


Hi Daniel,
I assume we need to call SystemData.PositionManager.GetClosedPositions() and get the pending orders for this too in addition to the above? Is this right? Or is it already covered in the SystemData.PositionManager.GetOpenPositions() itself?
Thanks,
Ishwar.


Edited: Thursday September 22 2016 by Ishwar
Posted Friday September 23 2016
There shouldn't be any pending orders for closed positions.  So you'd only need to call GetClosedPositions() if you wanted information about the history of what happened, but not if you want to know what orders are currently outstanding.

Thanks,
Daniel
Posted Saturday September 24 2016


For Each pos As Position In SystemData.PositionManager.GetOpenPositions
    Dim orders As List(Of PositionManager.TradeOrderAndOrder) = SystemData.PositionManager.GetPendingOrdersForPosition(pos.Info.PosID)
    For Each order As PositionManager.TradeOrderAndOrder In orders
       'do stuff here to get a list of orders for trades being closed.
       'if you do EOD stuff you will need this
    Next
   Next





Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems