I want to set a stoploss according to an input.
For example on a session the loss is set to 1 dollar. Then I want to put the stoploss on the Bars price minus the stop loss.
I found this page https://www.multicharts.com/trading-sof ... ial_Orders describing the formula that calculate from amount to a price.
So in order to get the amount I want to pass with the GenerateStopLoss function I came up with this:
Code: Select all
this.dStopAmount = (dStopPrice - dClosePrice) * Bars.Info.BigPointValue;
Can someone give me a pointer what I am doing wrong?