NexusFi: Find Your Edge


Home Menu

 





looking for atr breakout strategy


Discussion in Traders Hideout

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




 
Search this Thread

looking for atr breakout strategy

  #1 (permalink)
 Battygol 
mamaroneck NY/usa
 
Experience: Beginner
Platform: tos,multichart,ninja
Trading: ES,YM,CL,GC,NQ,TF,6J,
Posts: 3 since Feb 2017
Thanks Given: 1
Thanks Received: 1

Hello new on forum does anybody has a atr channel strategy breakout with entry stop and two targets for tos or ninjatrader ? thanks

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Build trailing stop for micro index(s)
Psychology and Money Management
ZombieSqueeze
Platforms and Indicators
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 
forgiven's Avatar
 forgiven 
Fletcher NC
Market Wizard
 
Experience: Intermediate
Platform: nijia trader
Broker: A.M.P. I.Q. ....C.Q.G.
Trading: ym es
Frequency: Every few days
Duration: Days
Posts: 862 since Mar 2012
Thanks Given: 287
Thanks Received: 580



Battygol View Post
Hello new on forum does anybody has a atr channel strategy breakout with entry stop and two targets for tos or ninjatrader ? thanks

the real strategy is knowing witch ones to take. any strategy trading from the long side would not be a good idea under the current market conditions . any strategy from the short side would not have been a good idea until 4 months ago .

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 Battygol 
mamaroneck NY/usa
 
Experience: Beginner
Platform: tos,multichart,ninja
Trading: ES,YM,CL,GC,NQ,TF,6J,
Posts: 3 since Feb 2017
Thanks Given: 1
Thanks Received: 1

input displace = 1;
input length1 = 8;
input length2 = 21;
input averageType = AverageType.WILDERS;
input atrlength = 1;
plot ATR = Average(TrueRange(high, close, low), ATRLength) / close;

def h = high[displace];
def l = low[displace];
def c = close;
def bn = BarNumber();
def na = Double.NaN;
def cb = highestAll(if !IsNaN(c) and IsNaN(c[-1]) then bn else na);

#plot Lb = Lowest(l, length1);
#Lb.SetDefaultColor(GetColor(8));

def Ub = Highest(h, length1);
#Ub.SetDefaultColor(Color.cyan);
plot ubatr = ub - ub * (atr*0.01);
ubatr.SetDefaultColor(Color.green);

def Lb2 = Lowest(l, length2);
#Lb2.SetDefaultColor(Color.red);
plot lb2atr = lb2 - lb2 * (atr*0.001) ;
#Ub2.SetDefaultColor(Color.RED);
lb2atr.SetDefaultColor(Color.cyan);
#plot Ub2 = Highest(h, length2);
#Ub2.SetDefaultColor(GetColor(8));
def ubLong = high crosses above Ubatr;
def ubEntry = if ubLong then ubatr else ubEntry[1];
#def ubLong = c crosses above Ub;
#def ubEntry = if ubLong then c else ubEntry[1];
def ubStop = if ubLong then Lb2atr else ubStop[1];
def ubT1 = if ubLong then ubEntry + 1.5 * (ubEntry - ubStop) else uBT1[1];
def ubT2 = if ubLong then ubEntry +3.5* (ubEntry - ubStop) else uBT2[1];

def longTradeOn = if ubLong
then 1
else if low crosses below ubStop
# or high crosses above ubT2
then 0
else longTradeOn[1];
def activeTrade = HighestAll(if bn == cb then longTradeOn else na);
plot Buy = if activeTrade then ubEntry else na;
Buy.SetDefaultColor(Color.white);
buy.SetPaintingStrategy(PaintingStrategy.horizontal);
buy.SetLineWeight(1);
plot Stop = if activeTrade then ubStop else na;
Stop.SetDefaultColor(Color.red);
stop.SetPaintingStrategy(PaintingStrategy.horizontal);
stop.SetLineWeight(1);
plot TargetOne = if activeTrade then ubT1 else na;
TargetOne.SetDefaultColor(Color.yellow);
TargetOne.SetPaintingStrategy(PaintingStrategy.horizontal);
TargetOne.SetLineWeight(1);
plot TargetTwo = if activeTrade then ubT2 else na;
TargetTwo.SetDefaultColor(Color.cyan);
TargetTwo.SetPaintingStrategy(PaintingStrategy.horizontal);
TargetTwo.SetLineWeight(1);

def location = !IsNaN(c) and IsNaN(c[-1]);
AddChartBubble(activetrade and location, ubEntry, "Entry: "+ubEntry, Buy.TakeValueColor());
AddChartBubble(activetrade and location, ubStop, "Stop: "+ubStop, Stop.TakeValueColor());
AddChartBubble(activetrade and location, ubT1, "T1: "+ubT1, TargetOne.TakeValueColor());
AddChartBubble(activetrade and location, ubT2, "T2: "+ubT2, TargetTwo.TakeValueColor());


#need to plot only first entry unless it hits the stop loss or second target then plot entry again ,also if can be converted to ninjatrader ,thanks ,

Started this thread Reply With Quote




Last Updated on December 27, 2018


© 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