NexusFi: Find Your Edge


Home Menu

 





PkPriceAlert2 for NT7 - need help


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ZTR with 12 posts (1 thanks)
    2. looks_two Todd with 8 posts (0 thanks)
    3. looks_3 oraclewizard77 with 6 posts (0 thanks)
    4. looks_4 Day Trading Fool with 5 posts (0 thanks)
    1. trending_up 15,300 views
    2. thumb_up 8 thanks given
    3. group 6 followers
    1. forum 43 posts
    2. attach_file 13 attachments




 
Search this Thread

PkPriceAlert2 for NT7 - need help

  #11 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

hi roonius,
thanks for the info!

will this .cs-file still work also in NT 6.5 ?

how do you handle the different versions now personaly ?
you have some experience i think.

will it make sense to insert _NT7 in the translated indi-file-names ?

i dont work on NT7 yet but i wonder how to keep all this organized on the own PCs over the time
of switching.

what do you think ?

max-td
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Diary of a simple price action trader
26 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
9 thanks
  #12 (permalink)
 
ZTR's Avatar
 ZTR 
 
Experience: Advanced
Platform: NinjaTrader7
Broker: Mirus RCG/Zen-Fire
Trading: CL & 6e, looking at ES, ZB and AU again.
Posts: 2,096 since Nov 2009
Thanks Given: 1,099
Thanks Received: 1,393

Hi roonius,

Can you tell me how it works?

In Trendline Alert Custom, Zondor wrote code that looks for an extended line with a name defined by the user.

The line is tagged in NT7 by double clicking on the line and entering the tag. This way it is coded into the indicator, see figure.

 
Code
                            
foreach (IDrawObject draw in DrawObjects)
     {
        if ((
draw.Tag.StartsWith("Test1")) &&draw is ILine)
          {
           
ILine drawnLine = (ILinedraw;    
           if(  
drawnLine.DrawType==DrawType.ExtendedLine )
            {
                 
LineName=draw.Tag;
                
currentYdrawnLine.StartY+(drawnLine.StartBarsAgo)/(-drawnLine.EndBarsAgo+drawnLine.StartBarsAgo+.0000001)*(drawnLine.EndY-drawnLine.StartY);
                
Values[0].Set(currentY);
            }  
    
//Price rising above the manually drawn Trend Line        
            
if((Close[0]-currentY>0&&lastprice-currentY<=0))
            {    
Alert("Alert"Priority.HighInstrumentName+": $"+Close[0]+", Rising Above Trendline "+LineNamesoundFileR1Color.BlackColor.Lime);
                Print(
"TrendLineCustom " +InstrumentName+": $"+Close[0]+", Rising Above Trendline "+LineName);
                
            }
              
    
//Price falling below the manually drawn Trend Line        
            
if((Close[0]-currentY<0&&lastprice-currentY>=0))
            
            {    
Alert("Alert"Priority.HighInstrumentName+": $"+Close[0]+", Falling Below Trendline "+LineNamesoundFileF1Color.RedColor.Yellow);
                Print(
"TrendLineCustom "+  InstrumentName+": $"+Close[0]+", Falling Below Trendline "+LineName);        
            }   
          }    
    
         }
        } 
When crossed, the alert is triggered.

R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Attached Thumbnails
Click image for larger version

Name:	PK2Alert.PNG
Views:	270
Size:	11.8 KB
ID:	14238  
Attached Files
Elite Membership required to download: TrendLineAlertCustom.cs
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #13 (permalink)
 
Todd's Avatar
 Todd 
Alpharetta, GA
 
Experience: Intermediate
Platform: ninja
Broker: Mirus / Zenfire
Trading: ES
Posts: 234 since Jun 2009
Thanks Given: 28
Thanks Received: 40


Roonius,

Thanks for the NT7 version of that PKPriceAlert2 indicator!

I'm assuming that with this NT7 version you still need to put 2 of them on your chart - one for uptrend and one for downtrend. Is that correct?

Even though I like this indicator. It has some inefficiencies. Having to add 2 of these to your chart indicator section seems sort of dumb. Could you possibly modify the code so it can handle a move up through a line or a move down thru a line and get rid of the uptrend/downtrend choice box at the top?

Please advise.
Thanks,
Todd

Started this thread Reply With Quote
  #14 (permalink)
 
roonius's Avatar
 roonius   is a Vendor
 
Posts: 131 since Jun 2009
Thanks Given: 20
Thanks Received: 295


max-td View Post
hi roonius,
thanks for the info!

will this .cs-file still work also in NT 6.5 ?

how do you handle the different versions now personaly ?
you have some experience i think.

will it make sense to insert _NT7 in the translated indi-file-names ?

i dont work on NT7 yet but i wonder how to keep all this organized on the own PCs over the time
of switching.

what do you think ?

Will not work in NT6.5

I am trying not to make any indicators compatible for both versions. For me it is simplier to keep separate versions. But that is just me...

Reply With Quote
Thanked by:
  #15 (permalink)
 
roonius's Avatar
 roonius   is a Vendor
 
Posts: 131 since Jun 2009
Thanks Given: 20
Thanks Received: 295


ZTrade101 View Post
Hi roonius,

Can you tell me how it works?

In Trendline Alert Custom, Zondor wrote code that looks for an extended line with a name defined by the user.

The line is tagged in NT7 by double clicking on the line and entering the tag. This way it is coded into the indicator, see figure.

When crossed, the alert is triggered.


It does the following:
1. Looks for draw object on the chart which matches specified tag name.
2. From the line start and end coordinates calculates slope.
3. Having slope you can calculate the lines value at each bar and trigger alert if price crosses it.

Reply With Quote
Thanked by:
  #16 (permalink)
 
ZTR's Avatar
 ZTR 
 
Experience: Advanced
Platform: NinjaTrader7
Broker: Mirus RCG/Zen-Fire
Trading: CL & 6e, looking at ES, ZB and AU again.
Posts: 2,096 since Nov 2009
Thanks Given: 1,099
Thanks Received: 1,393

It works!

Thanks.

R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Attached Images
 
Visit my NexusFi Trade Journal Reply With Quote
  #17 (permalink)
 
Todd's Avatar
 Todd 
Alpharetta, GA
 
Experience: Intermediate
Platform: ninja
Broker: Mirus / Zenfire
Trading: ES
Posts: 234 since Jun 2009
Thanks Given: 28
Thanks Received: 40

I want to say "answered" to my original question but there is no "answer" check box... how do I do that?

I think it may be because Mike moved the thread where I originally asked my question.

Started this thread Reply With Quote
  #18 (permalink)
 
Todd's Avatar
 Todd 
Alpharetta, GA
 
Experience: Intermediate
Platform: ninja
Broker: Mirus / Zenfire
Trading: ES
Posts: 234 since Jun 2009
Thanks Given: 28
Thanks Received: 40

Z,

I've never noticed the alert window. I always just listen for the sound alert. However, the alert window could be useful, if it had a little more info..

Would it be possible to somehow get the chart name (ie CL07-10 4 Range) and indicator name (ie PKPricealert2) to show up in that alert window somewhere?

I just made this suggestion for NT to add these things to their alert window but don't know if or when they will get around to it.

Don't know if there is a way to do it programmatically within an indicator itself or some other way that doesn't involve NT having to re-write their code for that screen.

Todd

PS... I mention this because I had an audio alert go off this morning that said "test". I do have a "test" wav file but I couldn't find where I had it in any of my indicator sets on any of my 15 charts.. If I could have just looked at the alert window to see where that alert came from, that would have been most helpful.

Started this thread Reply With Quote
  #19 (permalink)
 
ZTR's Avatar
 ZTR 
 
Experience: Advanced
Platform: NinjaTrader7
Broker: Mirus RCG/Zen-Fire
Trading: CL & 6e, looking at ES, ZB and AU again.
Posts: 2,096 since Nov 2009
Thanks Given: 1,099
Thanks Received: 1,393


Todd View Post
Z,

I've never noticed the alert window. I always just listen for the sound alert. However, the alert window could be useful, if it had a little more info..

Would it be possible to somehow get the chart name (ie CL07-10 4 Range) and indicator name (ie PKPricealert2) to show up in that alert window somewhere?

I just made this suggestion for NT to add these things to their alert window but don't know if or when they will get around to it.

Don't know if there is a way to do it programmatically within an indicator itself or some other way that doesn't involve NT having to re-write their code for that screen.

Todd

PS... I mention this because I had an audio alert go off this morning that said "test". I do have a "test" wav file but I couldn't find where I had it in any of my indicator sets on any of my 15 charts.. If I could have just looked at the alert window to see where that alert came from, that would have been most helpful.

I Got PK2 to work this morning, but for some reason it takes a while.

This is what I get with the DoubleZ optimized alert indys.

There is code on alerts all over the place. Need to have a discussion thread on coding alerts into 7, maybe?

R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Attached Thumbnails
Click image for larger version

Name:	ALert.PNG
Views:	229
Size:	72.5 KB
ID:	14478  
Visit my NexusFi Trade Journal Reply With Quote
  #20 (permalink)
 
Todd's Avatar
 Todd 
Alpharetta, GA
 
Experience: Intermediate
Platform: ninja
Broker: Mirus / Zenfire
Trading: ES
Posts: 234 since Jun 2009
Thanks Given: 28
Thanks Received: 40


Z,

Pk2 is working fine for me right now.

I think a thread on alert codes would be great.

I've noticed that pk2 does not work in market replay, at all. Have you noticed that?

Todd

Started this thread Reply With Quote




Last Updated on November 22, 2014


© 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