Support Board
Date/Time: Fri, 27 Dec 2024 17:50:04 +0000
Post From: Opening Stock Option position from a Stock Chart
[2016-01-20 15:09:36] |
User99735 - Posts: 234 |
Hi, My order placement code as follows - if (PermData->OrderData[TargetPercent] > 0) NewOrder.Target1Price = (double)optionPos->OptionEntryPrice * (1 + PermData->OrderData[TargetPercent] / 100); if (PermData->OrderData[StopPercent] > 0) { NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_3_OFFSETS; NewOrder.Stop1Price = (double)optionPos->OptionEntryPrice * (1 - PermData->OrderData[StopPercent] / 100); NewOrder.TriggeredTrailStopTriggerPriceOffset = (double)optionPos->OptionEntryPrice * PermData->OrderData[TrailTriggerPercent] / 100; NewOrder.TriggeredTrailStopTrailPriceOffset = (double)optionPos->OptionEntryPrice * PermData->OrderData[TrailByPercent] / 100; } result = sc.BuyOrder(NewOrder); Regards Vivek |