Login Page - Create Account

Support Board


Date/Time: Sat, 10 May 2025 18:24:26 +0000



Post From: learning to code a simple strategy

[2016-01-29 13:53:17]
User61576 - Posts: 446
ok. got this part of time and added it to my code.

another q.
i want my stop order (attached) to be % based on the entry price
which method is better as from what i am reading both will get me the same? am i correct?

this

SCInputRef stop_percentage = sc.Input[3];

NewOrder.StopAllOffset = sc.GetOrderFillEntry()*(1-stop_percentage);

or this


SCInputRef stop_percentage = sc.Input[3];

NewOrder.StopAllOffset = myPositionData.AveragePrice*(1-stop_percentage);
?