NexusFi: Find Your Edge


Home Menu

 





Keltner Channel and Stochastic


Discussion in MultiCharts

Updated
    1. trending_up 1,826 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

Keltner Channel and Stochastic

  #1 (permalink)
 alex20037 
Miami Lakes
 
Experience: Beginner
Platform: Multicharts
Broker: Interactive Brokers
Trading: Emini ES
Posts: 19 since Oct 2016
Thanks Given: 2
Thanks Received: 3

Hi everyone,

I am new to Multicharts and EL, relatively new to futures trading. Looking around for something to get started with, I came across with this signal. Please excuse any possible redundant code or maybe there is something that could be done in such an easier way, but this is completely new for me. With this strategy I am basically looking for a reversal once the price goes outside the channel. Stochastic is used for an exit. I am also adding a text with the current ATR value just to look at it, I like it always higher than 2. If good, this is something I would trade only in ES futures.

[IntrabarOrderGeneration = false]
inputs: Price(Close), Length(20), NumATRs(2), StartTime(0830), EndTime(1430);
inputs: StochLength(14), OverSold(20), OverBought(80);
variables: accountLoc(1), Hammer(0), positionSize(0), factor(0),
LowerBand(0), UpperBand(0), mean(0), ATR(0), LEConditions(false),
SEConditions(false), LXConditions(false), SXConditions(false), StoUp(false), StoDn(false),
HighTLColor (darkgreen),
HighTextColor (darkgreen),ATRTxt(0),
var0(0),var1(0),var2(0),var3(0);

mean = AverageFC(Price, Length);
ATR = AvgTrueRange( Length );
factor = ATR * NumATRs;
LowerBand = mean - factor;
UpperBand = mean + factor;
Hammer = (High - Low)/4;

//ATR
if LastBarOnChart then
begin
Text_Delete(ATRTxt);
ATRTxt = Text_New(date, time, high, text(" ATR:" + text(ATR) + text(" ")));
Text_setcolor(ATRTxt,yellow);
Text_SetBGColor(ATRTxt,darkblue);
Text_SetLocation(ATRTxt, date, time, GetAppInfo(aiHighestDispValue) - (10 * MinMove/PriceScale));
end;

Value1 = Stochastic(H, L, C, StochLength, 3, 3, 1, var0, var1, var2, var3);

LEConditions =

(
(High-Close) <= Hammer ) and ( ( Close crosses over LowerBand )
or ( (Low <= LowerBand) and (Close > LowerBand) )
or ( (Low <= LowerBand) and (Close > Open) and (Close > LowerBand) )
)
and ( Time > StartTime and Time < EndTime )

;

SEConditions =

( (Close-Low) <= Hammer ) and ( Close crosses below UpperBand )
and ( Time > StartTime and Time < EndTime )

;

LXConditions =

(Close crosses below UpperBand) or
(Close crosses below LowerBand) or
( (Close crosses below mean) ) or
( (var0 crosses under var1) )

;

SXConditions =

(Close crosses over LowerBand) or
(Close crosses over UpperBand) or
(Close crosses over mean) or
( (var0 crosses over var1) and (var0 < OverSold) )

;


if MarketPosition = 0 then begin

if LEConditions then begin
buy ( "KC+STO_LE" ) 1 contracts next bar at market;
end;

if SEConditions then begin
sellshort ( "KC+STO_SE" ) 1 contracts next bar at market;
end;

end;


if (MarketPosition = 1) then begin
if (LXConditions) then begin
if (CurrentContracts = 1) then begin
sell ( "KC+STO_LX" ) 1 contracts next bar at market;
end;
end;

end;

if (MarketPosition = -1) then begin
if (SXConditions) then begin
if (CurrentContracts = 1) then begin
buytocover ( "KC+STO_SX" ) 1 contracts next bar at market;
end;
end;
end;



I was wondering if anyone can give me some feedback on this please, do you think this could be something that would work long term? I know this won't be something that will generate a signal everyday, but again I am just looking for something to get started with. If you think this will never work, please share it as well, that'll help too. Any help will be truly appreciated.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
How to apply profiles
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
41 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #2 (permalink)
hoang101483
Oklahoma City USA
 
Posts: 47 since Oct 2016
Thanks Given: 0
Thanks Received: 1

Alex,

before we can backtest for long term use. You need find a reliable historical tick data. You can check to see if the data is consistent by adding 100 tick chart and compare the opening/closing range of each day, they should be relatively equal otherwise your historical data might be missing ticks.

Reply With Quote
  #3 (permalink)
hoang101483
Oklahoma City USA
 
Posts: 47 since Oct 2016
Thanks Given: 0
Thanks Received: 1


Alex,

It seem like Keltner Channel Strategy is a trend following technique or something?

I'm using the same settings as BB and getting double the results with half the drawdown

Reply With Quote
  #4 (permalink)
hoang101483
Oklahoma City USA
 
Posts: 47 since Oct 2016
Thanks Given: 0
Thanks Received: 1

Alex,

I'm getting unbelievable result using Keltner channel. Please email me immediately. We need to to automate this ASAP.

Please email directly [email protected]

Reply With Quote




Last Updated on October 26, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts