Topic: Modifying Stop Limit

Hello everybody,

I'm currently modifying the Stop Limit Indicator, but I struggle to understand how it is coded.

1) The code from github, when used as it is (apart renaming the indi and specifying that it is a Custom indi) seems generating no exit signals at all.

1) If I look at the code, I see no Component.DataType specified. How is the info about SL and TP passed to FSB?

Thanks in advance for your support :-)

Best regards from Germany


Re: Modifying Stop Limit

A while back I looked into it also. You won't get nowhere with custom indi stuff, you have to modify the project itself.

I asked Krog, and he told me this:

working with the stop loss / targets / account balance / break even type of info is in BacktestesterCalculator.cs ( … culator.cs ), start with AnalyseExit at line 1420. The actual call with order of methods is Calculation at 2408 (at the end). You may also have to add a few lines to some of the other methods like TransferFromPreviousBar. If you change things here, you have to do a lot of testing to be sure it works for all trading features like adding lots over the course of the trade, account in money vs pips, reversing lots, working with break even feature, etc.

I can't recall if Custom Indicators are blocked from this; if your custom indicator doesn't work after changing BacktesterCalculator, then add the indicator to your FSB build.

Hope this helps and don't forget to say thanks to Krog wink