Login Page - Create Account

Support Board


Date/Time: Thu, 01 Oct 2026 08:23:14 +0000



Post From: [Feature request] Can a single hotkey use the Buy/Sell column logic based on Last

[2026-08-19 02:24:56]
User450833 - Posts: 5
Yes.

I know this is quite a niche feature, so I understand if it’s not a priority yet or might not even be considered.

I’ve already implemented it as a custom study, so no worries if you want to drop the feature request.

const double targetPrice = sc.ChartTradingOrderPrice;
const double lastPrice = sc.LastTradePrice;

sc.SendOrdersToTradeService = sc.GlobalTradeSimulationIsOn ? 0 : 1;

s_SCNewOrder newOrder;
newOrder.OrderQuantity = sc.TradeWindowOrderQuantity;
newOrder.Price1 = targetPrice;
newOrder.Symbol = sc.GetTradeSymbol();
newOrder.TradeAccount = sc.SelectedTradeAccount;

if (isBuyClick)
{
if (targetPrice > lastPrice)
{
newOrder.OrderType = SCT_ORDERTYPE_STOP;
}
else
{
newOrder.OrderType = SCT_ORDERTYPE_LIMIT;
}
sc.BuyOrder(newOrder);
}
else if (isSellClick)
{
if (targetPrice >= lastPrice)
{
newOrder.OrderType = SCT_ORDERTYPE_LIMIT;
}
else
{
newOrder.OrderType = SCT_ORDERTYPE_STOP;
}
sc.SellOrder(newOrder);
}