- Save your current inputs.
- Remove Multiple Scalpy from your chart.
- Delete the original version of Scalpy.
- Shut down the platform.
- Download the version attached to post 1.
- Restart the platform.
- Drag Scalpy onto a chart and load up your set file.
SM("Trading hours: " + TradingHours + " (Local time)" + NL);
Underneath that is the block of code that sets up the elements to display. It needs to select the earliest order, so replace the block with this one:
Code: Select all
if (openTrades > 0)
{
//Select oldest order
if (betterOrderSelect(oldestTradeTicketNo, SELECT_BY_TICKET, MODE_TRADES) )
{
datetime breakEvenStarts = calculateBreakEvenStartTime();
datetime autoCloseStarts = calculateAutoCloseTime();
SM("Breakeven time " + TimeToStr(breakEvenStarts, TIME_MINUTES)
+ ": Automatic close time " + TimeToStr(autoCloseStarts, TIME_MINUTES) + " (Both are broker time)" + NL);
}//if (betterOrderSelect(oldestTradeTicketNo, SELECT_BY_TICKET, MODE_TRADES) )
}//if (openTrades > 0)