Hi!
I'm a fairly new user of ESignal and wondered if one of my ELA-codes (Tradestation) could be transferred to be used in ESignal.
Michael from the ESignal-Support asked me to post my question here.
Any help would be great!
Thanks a lot,
Harry
The study colors bars on a bar chart.
This is the ELA-Code:
{Name: ATRLngShrt
Notes: Paints bars based on the change of price from the lowest low or highest high
of a given period with the addition of the Average True Range
Input: BarLength - Number of bars to calculate lowest low or highest high (16 is the default value)
ATRLength - Number of days to calculate the ATR and the SMA of the ATR
}
Input: BarLength(16), ATRLength(9);
Vars: LowestLow(0), HighestHigh(0);
If CurrentBar > 1 Then Begin
LowestLow = Lowest (low, BarLength);
HighestHigh = Highest (High, BarLength);
If Close > LowestLow + AverageFC(AvgTrueRange(ATRLength), ATRLength) * 2.5 AND
Close > HighestHigh - AverageFC( AvgTrueRange(ATRLength), ATRLength) * 2.5 then begin
PlotPaintBar(High, Low, Open, Close, "LongShort", Green);
End;
If Close < HighestHigh - AverageFC( AvgTrueRange(ATRLength), ATRLength) * 2.5 AND
Close < LowestLow + AverageFC(AvgTrueRange(ATRLength), ATRLength) * 2.5 then begin
PlotPaintBar (High, Low, Open, Close, "LongShort", Red);
End;
End;
I'm a fairly new user of ESignal and wondered if one of my ELA-codes (Tradestation) could be transferred to be used in ESignal.
Michael from the ESignal-Support asked me to post my question here.
Any help would be great!
Thanks a lot,
Harry
The study colors bars on a bar chart.
This is the ELA-Code:
{Name: ATRLngShrt
Notes: Paints bars based on the change of price from the lowest low or highest high
of a given period with the addition of the Average True Range
Input: BarLength - Number of bars to calculate lowest low or highest high (16 is the default value)
ATRLength - Number of days to calculate the ATR and the SMA of the ATR
}
Input: BarLength(16), ATRLength(9);
Vars: LowestLow(0), HighestHigh(0);
If CurrentBar > 1 Then Begin
LowestLow = Lowest (low, BarLength);
HighestHigh = Highest (High, BarLength);
If Close > LowestLow + AverageFC(AvgTrueRange(ATRLength), ATRLength) * 2.5 AND
Close > HighestHigh - AverageFC( AvgTrueRange(ATRLength), ATRLength) * 2.5 then begin
PlotPaintBar(High, Low, Open, Close, "LongShort", Green);
End;
If Close < HighestHigh - AverageFC( AvgTrueRange(ATRLength), ATRLength) * 2.5 AND
Close < LowestLow + AverageFC(AvgTrueRange(ATRLength), ATRLength) * 2.5 then begin
PlotPaintBar (High, Low, Open, Close, "LongShort", Red);
End;
End;
Comment