Profile Picture

How to execute an order using today's closing price ?

Posted By gambulator 7 Months Ago
Message
Posted Tuesday March 07 2017
I know it is not realistic but I want to see OpenPosition method to buy using today's closing price. I am using yahoo EOD data. At the moment, it looks like it is always using tomorrow's price not today's. How do I exit my position using end of day closing price today ? I am using RelativeStrength RSI = new RelativeStrength(4); as the signal and if it is less than or equal to 25, buy, more than or equal to 55, I sell. It is all based on yahoo end of day data
Posted Tuesday March 07 2017
I have seen many people asking this question. I have set this SystemData.EnableTradeOnClose=true;
but I can't figure out the eventHandler bit. I see a VB sample buy on close but do you guys have a C# sample ?
    
Posted Monday August 21 2017
How about?
if (ShortMA.Current >  LongMA.Current)
{
position.CloseAtMarket();
}


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems