Norgate Data Norgate Data
 

RightEdge FAQ

General

What classification method is shown for Groups/Industries?
What margin rates are used for spot FX and how can I modify them?
My chart display looks corrupted. How do I fix this?

Database

I have separate databases and I want to swap the Data Store and Watchlist settings in RightEdge to refer to another database. How can I automate this?
How can I change the padding and adjustment settings in my trading system without manually configuring the plugin via the Tools > Options menu?
With "Configure NorgateData plug-in" and the options for "Price & Volume Adjustment", what events count as "Capital reconstructions" and "Special Distributions"?

Watch Lists

The Norgate watchlists do not seem to be present - how do I fix this?
How can I automatically select all of the stocks within a given watchlist (or multiple watchlists) from the RightEdge command-line?

System Testing

How do I exit a position prior to a stock being delisted in a backtest so that the position is not left open?
How do I avoid entering a position in a simulation on a stock that is about to be delisted?
How can I increase the scanning/backtest speed of RightEdge?
I am receiving errors when backtesting on a basket of Futures contracts. How can I resolve this?
How can I solve "Could not convert from XXX to YYY for date ZZZZZ
RightEdge will halt with an exception if a test encounters an illogical price record - for instance, where the Open is lower than the Low. Why do such records appear and is there a work-around?

Help

Where can I get help on using RightEdge?



What classification method is shown for Groups/Industries?

This field uses The Refinitiv Business Classification (TRBC) scheme. Groups are level 1 (TRBC Economic Sector) and the Industry is Level 4 (TRBC Industry).

What margin rates are used for spot FX and how can I modify them?

Spot Forex brokers all have different margins, commissions and overnight holding rates. By default, all forex rates are shown with a lot size of 1000 and leverage of 50:1. You can modify this if you want to run an FX simulation with different values. For example, if you wanted to test with FX lot sizes of 1000, with a leverage of 100:1 would require the following in the StartUp() method:

	const double FXLOTSIZE = 1000; // ie 1000 units per lot
	const double LEVERAGE = 100; // ie 100:1 Leverage 		
	if (Symbol.AssetClass == AssetClass.Forex) 
	{
		Symbol.SymbolInformation.ContractSize = FXLOTSIZE;
		Symbol.SymbolInformation.Margin = FXLOTSIZE / LEVERAGE; 
		Symbol.SymbolInformation.ShortMargin = Symbol.SymbolInformation.Margin; // i.e. use same leverage as Long Margin
	}

My chart display looks corrupted. How do I fix this?

We have had reports of chart display anomalies when Windows scaling is set to 125%. To modify your scaling, go Windows > Settings > System > Display, scroll down to "Scale and layout" and set "Change the size of text, apps and other items" to 100%.

I have separate databases and I want to swap the Data Store and Watchlist settings in RightEdge to refer to another database. How can I automate this?

By default, RightEdge saves its settings in the %appdata%\YYe-Software\user.config folder. You can copy the "user.config" folder to another location and then use the command-line parameter /SettingsFolder to reference that new location on startup.

By creating a 2nd shortcut to RightEdge that includes this command-line parameter, you can then choose to start RightEdge with whichever environment settings you prefer.

How can I change the padding and adjustment settings in my trading system without manually configuring the plugin via the Tools > Options menu?

You can set the date padding using ONE of the following command line parameters:

/NorgateDatePadding:None
/NorgateDatePadding:AllMarketDays
/NorgateDatePadding:AllWeekDays
/NorgateDatePadding:AllCalendarDays
The price & volume adjustment methods can be set using ONE of the following command line parameters:
/NorgatePriceAdjustment:None
/NorgatePriceAdjustment:Capital
/NorgatePriceAdjustment:CapitalSpecial
/NorgatePriceAdjustment:TotalReturn

With "Configure NorgateData plug-in" and the options for "Price & Volume Adjustment", what events count as "Capital reconstructions" and "Special Distributions"?

Capital reconstructions include splits & consolidations (reverse splits), capital returns, bonus issues (stock dividends) and right issues.
Special distributions include special dividends and distributions associated with spin-offs.

The Norgate watchlists do not seem to be present - how do I fix this?

RightEdge needs to be configured to use the Norgate Data Watchlist plugin. Please review the RightEdge Plugin Configuration Instructions and ensure that all of the steps have been performed.

How can I automatically select all of the stocks within a given watchlist (or multiple watchlists) from the RightEdge command-line?

To auto-select a given watchlist you can use the switch:

/W:"Watchlist Name" 
where the watchlist name is either a pre-defined watchhlist (e.g. "S&P 500") or one of your own.

If you want to select the contents of multiple watchlists, separate them with commas, e.g.:

/W:"S&P 500 Current & Past","My Trend Filter Indices","My Bond ETFs"
How do I exit a position prior to a stock being delisted in a backtest so that the position is not left open?

All securities that have been delisted (such as stocks) or are expiring (such as futures) will have the ExpirationDate property set. If you test to see that today's bar time is greater than or equal to the bar's start time, this should flag an exit on close.

Firstly, ensure that the NorgateData-RightEdge reference is shown in your Trading System window. and you have declared and instantiated the SecurityInfo class.

In the declaration (top) section of your system test, add the following:

	DateTime secondLastBarStartTime;

In the Startup method override, you can now assign it:

	secondLastBarStartTime = norgateSecurityInfo.SecondLastQuotedDate(Symbol.Name);

To exit any open positions on the second last bar add the following to the NewBar override:

	if (Bars.Current.BarStartTime == secondLastBarStartTime)
	{
		OutputMessage(Symbol.Name + " exiting on second last bar " + Bars.Current.BarStartTime);
		foreach(Position pos in OpenPositions)
		{
			pos.CloseAtMarket();
		}
	}		
How do I avoid entering a position in a simulation on a stock that is about to be delisted?

The solution here is very similar to ensuring that delisted positions are exited.

In the declaration (top) section of your system test, add the following:

	DateTime secondLastBarStartTime;

In the Startup method override, you can now assign it:

	secondLastBarStartTime = norgateSecurityInfo.SecondLastQuotedDate(Symbol.Name);

To exit any open positions on the second last bar add the following to any part of the NewBar condition that enters a new position:

	&& Bars.Current.BarStartTime != secondLastBarStartTime

How can I increase the scanning/backtest speed of RightEdge?

Click here for detailed solutions

I am receiving errors when backtesting on a basket of Futures contracts. How can I resolve this?

If you have specified an account currency that is different from the currency of the instrument(s) that you are trading, RightEdge will attempt to perform a conversion back to your account currency. If you have a subscription to the Spot Forex currency pairs, this will be handled automatically.

However, there are a few situations where this does not always work eg: the Euro, which was established in 1999.
Prior to 1999, there was an artificial construct known as the European Currency Unit (ECU) which was a fixed-weighted basket of foreign exchange rates. This was the precursor to what we know as the Euro today. A handful of Futures contracts were priced in ECU, but most of those contracts were delisted and replaced with new Euro-based contracts. Some exchanges kept their existing contracts listed and instead nominated a swap-over date to start trading in Euros. One notable example is the CAC 40 Futures, which changed its currency from French Francs to Euros in 1999, and remains listed to this date.

If you are backtesting against Euro-denominated Futures contracts in RightEdge, you have three options:

  1. Backtest with EUR set as your account currency, or
  2. Backtest with a start date no earlier than the 4th of Jan 1999, or
  3. Exclude the CAC40 continuous contract from your backtest.
Options 2 and 3 rely on your having the relevant FX rate in your database.

How can I solve "Could not convert from XXX to YYY for date ZZZZZ"?

This means that one or more securities in your simulation have a currency of XXX and your account is set to use currency YYY. There are two possible solutions:

  1. Change your Account Currency under Tools -> Options -> Account to the currency XXX. You may also want to change your Starting Capital and Allocation parameters in your simulation too.
  2. Subscribe to FX data. This provides historical data back to 1991 for most common currency pairs (1999 for EUR) and RightEdge will be able to dynamically use this historical data for position sizing using exchange rates that were applicable at the time. The advantage of this solution is that you can perform a simulation involving multiple futures markets that are denominated in different currencies.
RightEdge will halt with an exception if a test encounters an illogical price record - for instance, where the Open is lower than the Low. Why do such records appear and is there a work-around?

From time to time, the consolidated tape for US Stocks will report illogical prices for a stock, or an index may be reported with illogical values. These anomalies can't be corrected automatically - they need to be investigated before corrections can be published.

RightEdge can be prevented from halting at a price validation check by entering the following code in the Startup() method:

Symbol.IgnoreDataValidation = true;

Where can I get help on using RightEdge?

Help with using RightEdge can be found on the Right Edge Forum. Andreas Clenow of Following the Trend also makes extensive use of RightEdge and many examples can be seen in his code there.

The RightEdge website is no longer available, however an historical snapshot can be accessed here.