SetStopLoss function and currency

Questions about MultiCharts and user contributed studies.
Parker
Posts: 22
Joined: 18 May 2018
Has thanked: 7 times

SetStopLoss function and currency

Postby Parker » 31 Aug 2018

I'm using the setstoploss keyword in my strategy trading forex pairs. The value of the stop amount I get seems to be in the symbol currency rather than the base currency I have set in the strategy properties. I have assumed this because the loss amounts do not match the value I set and they seem to roughly line up with the currency exchange rates. Is my assumption correct and is this how it is supposed to work?

If so is there a quick way to change settings to use the base currency from strategy properties rather than the symbol currency? Or is it required to code in the conversion myself?

Thanks!

Code: Select all

setstoploss(100);

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: SetStopLoss function and currency

Postby Henry MultiСharts » 17 Sep 2018

Hello Parker,

By default the inputs for the special orders (such as SetStopLoss, SetProfitTarget, etc.) are treated in the Base Currency selected in Format->Strategy Properties->Properties.
If you want them to be treated in the currency of the symbol you need to use MultiCharts 9.1 or above and change the setting in the Windows Registry editor. Go to HKEY_CURRENT_USER\Software\TS Support\your MultiCharts version\StrategyProp and create a key SpecOrdersAmountIsStrategyCurr.
0 - calculate amount in instrument's currency.
1 - calculate amount in strategy/portfolio currency.


Return to “MultiCharts”