I have been trying to build the SwingTrendX.cs strategy and followed the following instruction :
Replaced PriceActionSwing.Utility with PriceActionSwing.Base;
Replaced SwingTypes with SwingStyle
But now getting the following errors :
Strategy\SwingTrendX.cs,'NinjaTrader.Indicator.PriceActionSwing' does not contain a definition for 'SwingTrend' and no extension method 'SwingTrend' accepting a first argument of type 'NinjaTrader.Indicator.PriceActionSwing' could be found (are you missing a using directive or an assembly reference?),CS1061 - click for info,61,72,
Strategy\SwingTrendX.cs,The best overloaded method match for 'NinjaTrader.Strategy.Strategy.PriceActionSwing(int, double, PriceActionSwing.Base.SwingStyle, bool)' has some invalid arguments,CS1502 - click for info,72,7,
Strategy\SwingTrendX.cs,Argument '1': cannot convert from 'NinjaTrader.Data.IDataSeries' to 'int',NT1503 - click for info,72,24,
Strategy\SwingTrendX.cs,Argument '3': cannot convert from 'int' to 'PriceActionSwing.Base.SwingStyle',CS1503 - click for info,72,44,
Strategy\SwingTrendX.cs,Argument '4': cannot convert from 'PriceActionSwing.Base.SwingStyle' to 'bool',CS1503 - click for info,72,55,
Strategy\SwingTrendX.cs,The best overloaded method match for 'NinjaTrader.Strategy.Strategy.PriceActionSwing(int, double, PriceActionSwing.Base.SwingStyle, bool)' has some invalid arguments,CS1502 - click for info,82,7,
Strategy\SwingTrendX.cs,Argument '1': cannot convert from 'NinjaTrader.Data.IDataSeries' to 'int',NT1503 - click for info,82,24,
Strategy\SwingTrendX.cs,Argument '3': cannot convert from 'int' to 'PriceActionSwing.Base.SwingStyle',CS1503 - click for info,82,44,
Strategy\SwingTrendX.cs,Argument '4': cannot convert from 'PriceActionSwing.Base.SwingStyle' to 'bool',CS1503 - click for info,82,55,
Any help would be appreciated.
Forgot to add that I've downloaded the indicator today. So I would expect it's the latest version.
Last edited by Christophe; February 3rd, 2015 at 11:19 AM.
Iím a newbie to futures.io (formerly BMT)F and have just spent four hours reading through all 116 pages of this thread. Iím a bit of a fish out of water here since Iíve been working on the MultiCharts platform for seven years. I do also own NinjaTrader, but Iím not a C# coder and in the past have struggled following C# source.
Iím looking for clarification of the PAS swing creation logic so that I can code basic PAS functionality for MultiCharts. At this point I do not need the full (amazing!) array of additional features and functions that dorschden and others have authored.
There were a number of comments that discussed the logic for creating a new swing point where Swing Type= Standard and Swing Size=N. From what Iíve been able to glean, a new swing low point will be created when N number of bars have been printed having highs lower than the prior swing highís high. Is this correct? Are there exceptions or other rules? For example: if the Swing Size=5 and five bars in a row print with their high 1 tick below the prior barís high would a new swing low still be printed? Or am I misunderstanding?
I really appreciate any additional clarifications. Many thanks
PDQ, I'm not @dorschden or @Silvester17, but here's a simple way to get it. If the Swing Size is, say, 7 (the default), it looks back at the previous 7 bars. If the current bar is above/below the high/low of that range, it is a new high/low point. That's it.
Since a picture is worth a thousand words, here's a quick way to see it.
The chart below has PAS with a 7 bar size and a Donchian Channel with a 7 bar period -- that is, the Donchian draws in the 7 bar range of highs and lows for easy visibility, and the PAS high/low swing dots shift when the previous 7-bar range is exceeded up or down. You can count the bars to be sure this is what is happening.
For instance, there is a swing low at 2080 on the chart. Each of the two bars just before it were lows of their previous 7-bar range of lows (and each had a dot showing it as a low), but it was the last to break the 7-bar range before price turned up, so it stayed the swing low. Then a new high point was reached, and the highs kept advancing until 2085.25, when the previous 7-bar range was no longer broken on the upside.... and so on.
That's all there is to it. It's a matter of exceeding or not exceeding a range. Works very well, too.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
The following 10 users say Thank You to bobwest for this post: