Hi Mladen,
Could you please make a version of "Step one more average" under Tradestation?
Thanks in advance,
Forexblasters
Re: TradeStation Indicators
72Dear Mladen,
should be possible to convert the attached, my favourite, indicators for Tradestation?
The first one should be easy ( I think ) while the second could be a challenge.
Thanks in advance,
Andrea
should be possible to convert the attached, my favourite, indicators for Tradestation?
The first one should be easy ( I think ) while the second could be a challenge.
Thanks in advance,
Andrea
Re: TradeStation Indicators
73I've coded an indicator from MT4 and in Tradestation it plots the same values, thus it works fine.
The big issue is : while in MT4 is not CPU demanding in Tradestation is exactly the opposite and it tooks minutes to plot the values.
Is there a way to fix properly the attached indicator ?
Thanks in advance,
Re: TradeStation Indicators
74Can someone please help me compile this code here?
I am a newcomer to Tradestation and I was searching for a couple of indicators I need in my analysis. I haven´t even installed TS yet, but I already see I will have trouble with this because the indicator needs to be compiled in TS (I believe something similar to metaeditor). One of the indicators I already found, the other I found only the code, but I have no clue how to compile it. I also wanted it to have an extra option in it´s settings to choose the type of volume used in the calculation. As it is now, it is hard coded to use the total volume, but I wanted to be able to choose between total volume or delta (bid-ask). The indicator I am talking about is the Weis Wave (or zig zag volume, or cumulative wave volume, or swing volume, all same thing).
Here is the code:
It was brought ot my attention that this indicator needs a function (that the indicator will reference), otherwise it won´t work. Again, I have no clue of how doing that. Here is the code for the function:
And someone gave me a tip on how to make it use delta instead of total volume by changing this bit of the code here:
// Initialize variables
dailyTF = BarType >= 2 and BarType < 5;
hi = iff( RetraceMethod = 4, Highest( HiPrice, Period ), HiPrice );
lo = iff( RetraceMethod = 4, Lowest( LoPrice, Period ), LoPrice );
vol = iff( dailyTF, Volume, Upticks-Downticks );
BUT, unless in TS code language Upticks-Downticks means Bid-Ask, then wouldn´t it be using tick volume ? I wanna real volume. So I wonder if the correct way isn´t:
// Initialize variables
dailyTF = BarType >= 2 and BarType < 5;
hi = iff( RetraceMethod = 4, Highest( HiPrice, Period ), HiPrice );
lo = iff( RetraceMethod = 4, Lowest( LoPrice, Period ), LoPrice );
vol = iff( dailyTF, Volume, Bid-Ask );
And I also realized that, correct if I am wrong, but shouldn´t this option be in the "Inputs" section of the code, not in "Initialize variables"? Anyways, as you can see I know ZERO programming, it would be great if someone with the hang of doing it in TS could grab this code and compile it for me, and then send me the indicator file ready to go.
Best regards
I am a newcomer to Tradestation and I was searching for a couple of indicators I need in my analysis. I haven´t even installed TS yet, but I already see I will have trouble with this because the indicator needs to be compiled in TS (I believe something similar to metaeditor). One of the indicators I already found, the other I found only the code, but I have no clue how to compile it. I also wanted it to have an extra option in it´s settings to choose the type of volume used in the calculation. As it is now, it is hard coded to use the total volume, but I wanted to be able to choose between total volume or delta (bid-ask). The indicator I am talking about is the Weis Wave (or zig zag volume, or cumulative wave volume, or swing volume, all same thing).
Here is the code:
Code: Select all
Version 1.00 (08/09/2013) Initial release.
Version 1.10 (10/25/2013) Bug negative time duration when a swing spans multiple days fixed.
Version 1.11 (11/02/2013) Correction on bug fix version 1.10.
This indicator is inspired on the Weis Wave with its cumulative wave volume. It plots a cumulative
ZigZag volume histogram, a ZigZag line and the cumulative volume, price change and/or duration of
the up/down swing at the swing high/low.
The ZigZag line can be based on point, percentage, ATR or UTC retracements.
The UTC retracement method is based on John R. Hill, George Pruitt, and Lundy Hill's description
in their book The Ultimate Trading Guide, page 39: "A top pivot point is the highest price in a
movement prior to penetration of the low of the top bar. A bottom pivot point is the lowest price
in a movement prior to penetration of the high of the low bar."
The UTC version is an improved version in which the highs and lows are calculated over a period.
Longer periods make the ZigZag UTC less sensitive. The default period for the UTC is 2 bars.}
Inputs:
Offset (0.2),
Font_Size(10),
HiPrice( close ), // price field for high swings
LoPrice( close ), // price field for low swings
RetraceMethod( 1 ), // 1=Pnt, 2=%, 3=ATR, 4=UTC
Period( 2 ), // number of bars over which ATR or UTC is calculated
Retrace( 0 ), // retracement in Pnt, % or ATR multiple
PlotVolume( true ), // plots cumulative volume histogram
PlotSwings( true ), // plots ZigZag lines
PlotVolumeText( true ), // plots cumulative volume of up/down swing at swing high/low
ScaleVolumeBy( 1 ), // divides cumulative volume text by the number of this input
PlotPriceText( false ), // plots price change of up/down swing at swing high/low
PlotTimeText( false ), // plots duration of up/down swing at swing high/low
LineWidth( 0 ), // line width of ZigZag lines: 0,1,2,3,4,5,6
LineStyle( tool_solid), // line style of ZigZag lines: tool_solid, tool_dotted, tool_dashed, tool_dashed2, tool_dashed3
UpColor( red ), // line color of upswings: PowerLanguage colors
DnColor( red ), // line color of downswings: PowerLanguage colors
TextColor( black ); // text color: PowerLanguage colors
Vars:
dailyTF( false ),
dir( 0 ),
hi( HiPrice ),
lo( LoPrice ),
lastLoBar( 1 ),
lastHiBar( 1 ),
lastHi( HiPrice ),
lastLo( LoPrice ),
swingHiCondition( false ),
swingLoCondition( false ),
vol( 0 ),
volUp( 0 ),
volDn( 0 ),
barsBack( 0 ),
x( 0 ),
tl( 0 ),
plotText( "" ),
waveTxt( 0 );
// Initialize variables
dailyTF = BarType >= 2 and BarType < 5;
hi = iff( RetraceMethod = 4, Highest( HiPrice, Period ), HiPrice );
lo = iff( RetraceMethod = 4, Lowest( LoPrice, Period ), LoPrice );
vol = iff( dailyTF, Volume, Ticks);
// set initial trend direction (dir will become non-zero after the first couple of bars)
if dir = 0 then
begin
if hi[0] > lastHi then // higher high
begin
lastHi = hi[0];
lastHiBar = CurrentBar;
if lo[0] > lo[1] then // higher low
dir = 1; // initial trend direction is up
end;
if lo[0] < lastLo then // lower low
begin
lastLo = lo[0];
lastLoBar = CurrentBar;
if hi[0] < hi[1] then // lower high
dir = -1; // initial trend direction is down
end;
end;
// look for swing points and draw lines
if dir > 0 then // trend is up, look for new swing high
begin
if RetraceMethod = 1 then swingHiCondition = lo[0] < lastHi - Retrace; // condition for swing high pnt
if RetraceMethod = 2 then swingHiCondition = lo[0] < lastHi * (1 - Retrace * 0.01 ); // condition for swing high %
if RetraceMethod = 3 then swingHiCondition = lo[0] < lastHi - ( Retrace * AvgTrueRange( Period ) ); // condition for swing high ATR
if RetraceMethod = 4 then swingHiCondition = hi[0] < lastHi and lo[0] < lo[1]; // condition for swing high UTC
if not swingHiCondition then
begin
if hi[0] > lastHi then // found a higher high
begin
lastHi = hi[0];
lastHiBar = CurrentBar;
end;
// update cumulative volume of upswing
volUp = 0;
barsBack = ( CurrentBar - lastLoBar - 1 );
for x = barsBack downto 0
begin
volUp = volUp + vol[x];
if PlotVolume then
begin
NoPlot[x]( 2 );
Plot1[x]( VolUp, "Volume Up" );
end;
end;
// update current upswing line and text from lastLoBar
if PlotSwings then
TL_SetEnd_Dt( tl, datetime[0], lastHi );
plotText =
iffString( PlotTimeText, iffString( dailyTF, NumToStr( CurrentBar - lastLoBar, 0 ) + " bar(s)",
DateTimeToHMS( ( ELDateToDateTime( Date[0] ) - ELDateToDateTime( Date[CurrentBar - lastLoBar] ) ) +
ELTimeToDateTime_s( Time_s[0] ) - ELTimeToDateTime_s( Time_s[CurrentBar - lastLoBar] ) ) ), "" ) +
iffString( PlotVolumeText, NewLine + NumToSTr( volUp + Offset / ScaleVolumeBy, 0 ), "" ) +
iffString( PlotPriceText, NewLine + "+" + NumToSTr( ( lastHi - lastLo ) * PriceScale, 0 ), "" );
Text_SetLocation_Dt( waveTxt, datetime[0], High[0] + Offset );
Text_SetString( waveTxt, plotText );
end
else if swingHiCondition then // found a swing high
begin
// update cumulative volume of upswing
volUp = 0;
barsBack = ( CurrentBar - lastLoBar - 1 );
for x = barsBack downto ( CurrentBar - lastHiBar )
begin
volUp = volUp + vol[x];
if PlotVolume then
begin
NoPlot[x]( 2 );
Plot1[x]( VolUp, "Volume Up" );
end;
end;
// update current upswing line from lastLoBar
if PlotSwings then
TL_SetEnd_Dt( tl, datetime[CurrentBar - lastHiBar], lastHi );
plotText =
iffString( PlotTimeText, iffString( dailyTF, NumToStr( lastHiBar - lastLoBar, 0 ) + " bar(s)",
DateTimeToHMS( ( ELDateToDateTime( Date[CurrentBar - lastHiBar] ) - ELDateToDateTime( Date[CurrentBar - lastLoBar] ) ) +
ELTimeToDateTime_s( Time_s[CurrentBar - lastHiBar] ) - ELTimeToDateTime_s( Time_s[CurrentBar - lastLoBar] ) ) ), "" ) +
iffString( PlotVolumeText, NewLine + NumToSTr( volUp / ScaleVolumeBy, 0 ), "" ) +
iffString( PlotPriceText, NewLine + "+" + NumToSTr( ( lastHi - lastLo ) * PriceScale, 0 ), "" );
Text_SetLocation_Dt( waveTxt, datetime[CurrentBar - lastHiBar], High[CurrentBar - lastHiBar] + Offset );
Text_SetString( waveTxt, plotText );
dir = -1; // trend direction is now down
lastLo = lo[0];
lastLoBar = CurrentBar; // now seeking new lows
volDn = 0;
barsBack = ( CurrentBar - lastHiBar - 1 );
for x = barsBack downto 0
begin
volDn = volDn + vol[x];
if PlotVolume then
begin
NoPlot[x]( 1 );
Plot2[x]( VolDn, "Volume Down" );
end;
end;
if PlotSwings then // start new trendline from new swing high to most recent low
begin
tl = TL_New_Dt( datetime[CurrentBar - lastHiBar], lastHi, datetime[CurrentBar - lastLoBar], lastLo );
TL_SetExtLeft( tl, false );
TL_SetExtRight( tl, false );
TL_SetSize( tl, LineWidth );
TL_SetStyle( tl, LineStyle );
TL_SetColor( tl, DnColor );
end;
plotText =
iffString( PlotPriceText, NumToSTr( ( lastLo - lastHi ) * PriceScale, 0 ), "" ) +
iffString( PlotVolumeText, NewLine + NumToSTr( volDn / ScaleVolumeBy, 0 ), "" ) +
iffString( PlotTimeText, NewLine + iffString( dailyTF, NumToStr( lastLoBar - lastHiBar, 0 ) + " bar(s)",
DateTimeToHMS( ( ELDateToDateTime( Date[CurrentBar - lastLoBar] ) - ELDateToDateTime( Date[CurrentBar - lastHiBar] ) ) +
ELTimeToDateTime_s( Time_s[CurrentBar - lastLoBar] ) - ELTimeToDateTime_s( Time_s[CurrentBar - lastHiBar] ) ) ), "" );
waveTxt = Text_New_Dt( datetime[CurrentBar - lastLoBar], Low[CurrentBar - lastLoBar], plotText );
Text_SetStyle( waveTxt, 2, 0 );
Text_SetSize( waveTxt, Font_Size );
Text_SetColor( waveTxt, TextColor );
end;
end
else
begin // dir < 0, trend is down, look for new swing low
if RetraceMethod = 1 then swingLoCondition = hi[0] > lastLo + Retrace; // condition for swing low pnt
if RetraceMethod = 2 then swingLoCondition = hi[0] > lastLo * (1 + Retrace * 0.01 ); // condition for swing low %
if RetraceMethod = 3 then swingLoCondition = hi[0] > lastLo + ( Retrace * AvgTrueRange( Period ) ); // condition for swing low ATR
if RetraceMethod = 4 then swingLoCondition = lo[0] > lastLo and hi[0] > hi[1]; // condition for swing low UTC
if not swingLoCondition then
begin
if lo[0] < lastLo then // found a lower low
begin
lastLo = lo[0];
lastLoBar = CurrentBar;
end;
// update cumulative volume of downswing
volDn = 0;
barsBack = ( CurrentBar - lastHiBar - 1 );
for x = barsBack downto 0
begin
volDn = volDn + vol[x];
if PlotVolume then
begin
NoPlot[x]( 1 );
Plot2[x]( VolDn, "Volume Down" );
end;
end;
// update current downswing line and text from lastHiBar
if PlotSwings then
TL_SetEnd_Dt( tl, datetime[0], lastLo );
plotText =
iffString( PlotPriceText, NumToSTr( ( lastLo - lastHi ) * PriceScale, 0 ) + NewLine, "" ) +
iffString( PlotVolumeText, NumToSTr( volDn / ScaleVolumeBy, 0 ) + NewLine, "" ) +
iffString( PlotTimeText, iffString( dailyTF, NumToStr( CurrentBar - lastHiBar, 0 ) + " bar(s)",
DateTimeToHMS( ( ELDateToDateTime( Date[0] ) - ELDateToDateTime( Date[CurrentBar - lastHiBar] ) ) +
ELTimeToDateTime_s( Time_s[0] ) - ELTimeToDateTime_s( Time_s[CurrentBar - lastHiBar] ) ) ), "" );
Text_SetLocation_Dt( waveTxt, datetime[0], Low[0] - Offset );
Text_SetString( waveTxt, plotText );
end
else if swingLoCondition then // found a swing low
begin
// update cumulative volume of downswing
volDn = 0;
barsBack = ( CurrentBar - lastHiBar - 1 );
for x = barsBack downto ( CurrentBar - lastLoBar )
begin
volDn = volDn + vol[x];
if PlotVolume then
begin
NoPlot[x]( 1 );
Plot2[x]( VolDn, "Volume Down" );
end;
end;
// update current downswing line from lastHiBar
if PlotSwings then
TL_SetEnd_Dt( tl, datetime[CurrentBar - lastLoBar], lastLo );
plotText =
iffString( PlotPriceText, NumToSTr( ( lastLo - lastHi ) * PriceScale, 0 ) + NewLine, "" ) +
iffString( PlotVolumeText, NumToSTr( volDn / ScaleVolumeBy, 0 ) + NewLine, "" ) +
iffString( PlotTimeText, iffString( dailyTF, NumToStr( lastLoBar - lastHiBar, 0 ) + " bar(s)",
DateTimeToHMS( ( ELDateToDateTime( Date[CurrentBar - lastLoBar] ) - ELDateToDateTime( Date[CurrentBar - lastHiBar] ) ) +
ELTimeToDateTime_s( Time_s[CurrentBar - lastLoBar] ) - ELTimeToDateTime_s( Time_s[CurrentBar - lastHiBar] ) ) ), "" );
Text_SetLocation_Dt( waveTxt, datetime[CurrentBar - lastLoBar], Low[CurrentBar - lastLoBar] - Offset );
Text_SetString( waveTxt, plotText );
dir = 1; // trend direction is now up
lastHi = hi[0];
lastHiBar = CurrentBar; // now seeking new highs
volUp = 0;
barsBack = ( CurrentBar - lastLoBar - 1 );
for x = barsBack downto 0
begin
volUp = volUp + vol[x];
if PlotVolume then
begin
Plot1[x]( VolUp, "Volume Up" );
NoPlot[x]( 2 );
end;
end;
if PlotSwings then // start new trendline from new swing low to most recent high
begin
tl = TL_New_Dt( datetime[CurrentBar - lastLoBar], lastLo, datetime[CurrentBar - lastHiBar], lastHi );
TL_SetExtLeft( tl, false );
TL_SetExtRight( tl, false );
TL_SetSize( tl, LineWidth );
TL_SetStyle( tl, LineStyle );
TL_SetColor( tl, UpColor );
end;
plotText =
iffString( PlotTimeText, iffString( dailyTF, NumToStr( lastHiBar - lastLoBar, 0 ) + " bar(s)",
DateTimeToHMS( ( ELDateToDateTime( Date[CurrentBar - lastHiBar] ) - ELDateToDateTime( Date[CurrentBar - lastLoBar] ) ) +
ELTimeToDateTime_s( Time_s[CurrentBar - lastHiBar] ) - ELTimeToDateTime_s( Time_s[CurrentBar - lastLoBar] ) ) ), "" ) +
iffString( PlotVolumeText, NewLine + NumToSTr( volUp / ScaleVolumeBy, 0 ), "" ) +
iffString( PlotPriceText, NewLine + "+" + NumToSTr( ( lastHi - lastLo ) * PriceScale, 0 ), "" );
waveTxt = Text_New_Dt( datetime[CurrentBar - lastHiBar], High[CurrentBar - lastHiBar], plotText );
Text_SetStyle( waveTxt, 2, 1 );
Text_SetSize( waveTxt, Font_Size );
Text_SetColor( waveTxt, TextColor );
end;
end;
It was brought ot my attention that this indicator needs a function (that the indicator will reference), otherwise it won´t work. Again, I have no clue of how doing that. Here is the code for the function:
Code: Select all
inputs: XDateTime_s( numericsimple );
var: var0(0),var1(0),var2(0);
var0 = 24 * IntPortion( XDateTime_s ) + IntPortion( 24 * FracPortion( XDateTime_s ) ); // hours
var1 = IntPortion( 60 * FracPortion( 24 * XDateTime_s ) ); // minutes
var2 = IntPortion( 60 * FracPortion( 60 * FracPortion( 24 * XDateTime_s ) ) ); // seconds
DateTimeToHms = NumToStr( var0, 0 ) + "h" + NumToStr( var1, 0 ) + "m" + NumToStr( var2, 0 ) + "s";
And someone gave me a tip on how to make it use delta instead of total volume by changing this bit of the code here:
// Initialize variables
dailyTF = BarType >= 2 and BarType < 5;
hi = iff( RetraceMethod = 4, Highest( HiPrice, Period ), HiPrice );
lo = iff( RetraceMethod = 4, Lowest( LoPrice, Period ), LoPrice );
vol = iff( dailyTF, Volume, Upticks-Downticks );
BUT, unless in TS code language Upticks-Downticks means Bid-Ask, then wouldn´t it be using tick volume ? I wanna real volume. So I wonder if the correct way isn´t:
// Initialize variables
dailyTF = BarType >= 2 and BarType < 5;
hi = iff( RetraceMethod = 4, Highest( HiPrice, Period ), HiPrice );
lo = iff( RetraceMethod = 4, Lowest( LoPrice, Period ), LoPrice );
vol = iff( dailyTF, Volume, Bid-Ask );
And I also realized that, correct if I am wrong, but shouldn´t this option be in the "Inputs" section of the code, not in "Initialize variables"? Anyways, as you can see I know ZERO programming, it would be great if someone with the hang of doing it in TS could grab this code and compile it for me, and then send me the indicator file ready to go.
Best regards
Alberto Gauer Borrego seller on MQL5 aka Rogue_Trader / LogicGate / Gauer
Re: TradeStation Indicators
75Hi,
Can someone please help me and add Depth and Backstep calculation to this ZigZag indicator
Thanks in advance
[
Can someone please help me and add Depth and Backstep calculation to this ZigZag indicator
Thanks in advance
[
Code: Select all
{ Search Tag: WA-ZigZag % }
using elsystem;
using elsystem.drawing;
using elsystem.drawingobjects;
inputs:
double HighPivotPrice( High ) [
DisplayName = "HighPivotPrice",
ToolTip = "Enter an EasyLanguage expression to use in the calculation of high ZigZag pivots."],
double LowPivotPrice( Low ) [
DisplayName = "LowPivotPrice",
ToolTip = "Enter an EasyLanguage expression to use in the calculation of low ZigZag pivots."],
double RetracePct( 5 ) [
DisplayName = "RetracePct",
ToolTip = "Retracement Percentage. Enter The amount of retracement of the price specified in the price input that will cause a new zigzag line to be drawn."],
int LineColor( MyColors( "DodgerBlue" ) ) [
DisplayName = "LineColor",
ToolTip = "Enter the color to be used for the zigzag lines."],
int LineWidth( 1 ) [
DisplayName = "LineWidth",
ToolTip = "Enter the width, specified as a number, of the zigzag lines. This value can have any integer value from 0 to 6."];
variables:
intrabarpersist bool UseBNPoint( false ),
int DrawingObjectBarNumber( 0 ),
TrendLine ZigZagTrendline( NULL ),
DTPoint SwingDTPoint( NULL ),
DTPoint LastSwingDTPoint( NULL ),
BNPoint SwingBNPoint( NULL ),
BNPoint LastSwingBNPoint( NULL ),
double NewSwingPrice( 0 ),
double SwingPrice( Close ), { used as a convenient 2-element array }
int TLDir( 0 ), { TLDir = -1 implies prev TL dn, +1 implies prev TL up }
double RetraceFctrUp( 1 + RetracePct * .01 ),
double RetraceFctrDn( 1 - RetracePct * .01 ),
bool SaveSwing( false ),
bool AddTL( false ),
bool UpdateTL( false );
method TrendLine CreateNewTrendline()
variables: TrendLine tempTL;
begin
if UseBNPoint then
tempTL = TrendLine.Create( LastSwingBNPoint, SwingBNPoint )
else { use DTPoint }
tempTL = TrendLine.Create( LastSwingDTPoint, SwingDTPoint );
{
Setting 'Persist' to false causes the trendline to be deleted on an
intrabar tick. When set to false, a trendline that is created on the
closing tick of the bar is saved/retained.
}
tempTL.Persist = false;
tempTL.Lock = true; { prevent inadvertent moving }
tempTL.Color = GetColorFromInteger( 255, LineColor );
tempTL.ExtLeft = false;
tempTL.ExtRight = false;
tempTL.Weight = LineWidth;
{
this is how the trendline is "shown"; the trendline is added to the
DrawingObjects collection; if you want to remove the trendline, you can
use the Delete method of the DrawingObjects class; DrawingObjects collection
is not available in RadarScreen (it is NULL), so we only add the trendlines
to the collection if not NULL
}
if DrawingObjects <> NULL then
DrawingObjects.Add( tempTL );
return tempTL;
end;
{ convert integer color to a color object and return the color object }
method Color GetColorFromInteger( int Alpha, int ColorInteger )
begin
return Color.FromARGB( Alpha, GetRValue( ColorInteger ),
GetGValue( ColorInteger ), GetBValue( ColorInteger ) );
end;
once
begin
{
When this study is applied to tick bars or advanced bars, we use BNPoint
positioning of text labels. This ensures that the text labels are positioned
on the correct bar even when multiple bars occur in the same second (as can
occur with very short-term tick bars). When positioning time-based bars, on
the other hand, we’ll use DTPoint positioning. This type of positioning can
account for missing bars in the data stream (periods of no trading activity,
as can occur with ‘thin’ issues). Missing bars, of course, cannot occur when
using tick-based charts or advanced bars, since these bar-building mechanisms
do not move along the x-axis until enough trades have occurred to complete a
bar. Thus, the approach illustrated here gives us the best of both worlds
– sub-second positioning and automatic accounting for missing bars.
}
UseBNPoint = BarType = 0 or ( BarType > 4 and BarType <> 14 );
if UseBNPoint then
SwingBNPoint = BNPoint.Create( CurrentBar + MaxBarsBack - 1, Close )
else
SwingDTPoint = DTPoint.Create( BarDateTime, Close );
end;
{ set the bar number for the drawing object }
if UseBNPoint then
DrawingObjectBarNumber = CurrentBar + MaxBarsBack - 1;
NewSwingPrice = SwingHigh( 1, HighPivotPrice, 1, 2 );
if NewSwingPrice <> -1 then
begin
if TLDir <= 0 and NewSwingPrice >= SwingPrice * RetraceFctrUp then
begin
SaveSwing = true;
AddTL = true;
TLDir = 1;
end
else if TLDir = 1 and NewSwingPrice >= SwingPrice then
begin
SaveSwing = true;
UpdateTL = true;
end;
end
else
begin
NewSwingPrice = SwingLow( 1, LowPivotPrice, 1, 2 );
if NewSwingPrice <> -1 then
begin
if TLDir >= 0 and NewSwingPrice <= SwingPrice * RetraceFctrDn then
begin
SaveSwing = true;
AddTL = true;
TLDir = -1;
end
else if TLDir = -1 and NewSwingPrice <= SwingPrice then
begin
SaveSwing = true;
UpdateTL = true;
end;
end;
end;
{ save new swing and reset SaveSwing }
if SaveSwing then
begin
if UseBNPoint then
begin
LastSwingBNPoint = SwingBNPoint;
SwingBNPoint = BNPoint.Create( DrawingObjectBarNumber[1], NewSwingPrice );
end
else
begin
LastSwingDTPoint = SwingDTPoint;
SwingDTPoint = DTPoint.Create( BarDateTime[1], NewSwingPrice );
end;
SwingPrice = NewSwingPrice;
SaveSwing = false;
end;
if AddTL then { add new trendline }
begin
ZigZagTrendline = CreateNewTrendline();
AddTL = false;
end
else if UpdateTL then { update trendline }
begin
if ZigZagTrendline <> NULL then
begin
if UseBNPoint then
ZigZagTrendline.SetEndPoint( SwingBNPoint )
else
ZigZagTrendline.SetEndPoint( SwingDTPoint );
end;
UpdateTL = false;
end;
{ ** Copyright © TradeStation Technologies, Inc. All Rights Reserved **
** TradeStation reserves the right to modify or overwrite this analysis technique
with each release. ** }
Re: TradeStation Indicators
76Thank you for posting this. I be been looking for a TS version of this paid ninja indicator for awhile.
Volatility-super-trend
This dsl is the closest thing i have found to it. I tried to set up alerts and they are not working. Is there anyway for this to be customized into looking more like the ninja actor version?
Thank you for the indicator
Re: TradeStation Indicators
77hello
are downtickcs value sin tradestation negative numbers or always positive ?
are downtickcs value sin tradestation negative numbers or always positive ?
Re: TradeStation Indicators
78Dear Mladen / MrTools,
I appreciate so much the work you have developed for the retail trader provided your code´s expertise. I really want to switch platform for Tradestation to trade futures.
I kindly ask if can help me in convert this 2 indicators to Tradestation Please.
Thanks in advance and kind regards,
Eggzactly
I appreciate so much the work you have developed for the retail trader provided your code´s expertise. I really want to switch platform for Tradestation to trade futures.
I kindly ask if can help me in convert this 2 indicators to Tradestation Please.
Thanks in advance and kind regards,
Eggzactly
Re: TradeStation Indicators
79Hi,
attached is the easylanguage formula of an indicator showing Supports and Resistances,
and to set it to full screen:
Right click in the screen > Format Analysis Techniques > Format > Scaling tab > Scale On: Same Axis as Underlying Data > OK
attached is the easylanguage formula of an indicator showing Supports and Resistances,
and to set it to full screen:
Right click in the screen > Format Analysis Techniques > Format > Scaling tab > Scale On: Same Axis as Underlying Data > OK
Re: TradeStation Indicators
80Hello mladen, thanks for your brilliant work.
Are you able to publish a version of this as a function instead of an indicator? TradeStation does not have a way to call indicators from strategy code.
I would have done it myself but I do not want to break the forum rules by asking for code.