Need help with PKPriceAlert2 indicator - NinjaTrader Programming | futures io social day trading
futures io futures trading


Need help with PKPriceAlert2 indicator
Updated: Views / Replies:2,748 / 21
Created: by Todd Attachments:5

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 5  
 
Thread Tools Search this Thread
 

Need help with PKPriceAlert2 indicator

  #1 (permalink)
Elite Member
Alpharetta, GA
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: Mirus / Zenfire
Favorite Futures: ES
 
Todd's Avatar
 
Posts: 257 since Jun 2009
Thanks: 28 given, 40 received

Need help with PKPriceAlert2 indicator

I can get the PKPriceAlert2 indicator to work on CL, 6e and GC. It's actually pretty cool to be able to draw a horizontal line and get an audio alert at that price.

However, I can't get this indicator to work for 6a or 6e. After messing around with various tests, I can see that the problem lies in the code only looking for 2 digits instead of 4. Since 6a, 6e, 6b, etc have 4 digits after the 1 (1.3670, etc), the indicator in it's current form won't work on those.

Can someone tell me what lines to edit how to change the code to allow for 2 more digits so it can be used on currencies that have 4 digits after the decimal point?

Thanks,
Todd

Attached Files
Register to download File Type: zip PKPriceAlert2.zip (2.3 KB, 38 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Aberdeen + UK
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation
Favorite Futures: NQ
 
Posts: 6 since Dec 2009
Thanks: 0 given, 3 received


in the following line, try changing the 2 to 4

double PriceAlert = Math.Round(CO.Value,2);

Reply With Quote
 
  #4 (permalink)
Elite Member
Alpharetta, GA
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: Mirus / Zenfire
Favorite Futures: ES
 
Todd's Avatar
 
Posts: 257 since Jun 2009
Thanks: 28 given, 40 received

Thanks, Martin.. that seems to have worked.

Do you know how to make it so the sound alert wav file name gets typed into the indicator input screen instead of the actual code?

Todd

Reply With Quote
 
  #5 (permalink)
 R.I.P. 1960-2010 
 
Futures Experience: Advanced
Platform: NinjaTrader7
Broker/Data: Mirus RCG/Zen-Fire
Favorite Futures: CL & 6e, looking at ES, ZB and AU again.
 
ZTR's Avatar
 
Posts: 2,099 since Nov 2009
Thanks: 1,104 given, 1,390 received

Need to make a category

If you look at the code of any indicator that has user defined input(s) there is code for each category near the bottom before the Ninja Generated code.

[Description("")]
[Category("Alerts")]
[Description("Sound")]

public bool Soundon
{
get { return soundOn; }
set { soundOn = value; }
}

[Description("Sound file foralert.")]
[Category("Alerts")]
public string Wavefilefame
{
get { return Wavefilename; }
set { Wavefilename = value; }

Reply With Quote
 
  #6 (permalink)
Elite Member
Alpharetta, GA
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: Mirus / Zenfire
Favorite Futures: ES
 
Todd's Avatar
 
Posts: 257 since Jun 2009
Thanks: 28 given, 40 received

Ztrader,

Thanks for the help. I pasted the code into the properties part of the indicator but I got the following errors...how do I get rid of these?

2010-02-17_0652

I've attached the indicator in the original post. Could you insert the code properly and reattach it or tell me how to get rid of these errors?

Thanks,
Todd

Reply With Quote
 
  #7 (permalink)
 R.I.P. 1960-2010 
 
Futures Experience: Advanced
Platform: NinjaTrader7
Broker/Data: Mirus RCG/Zen-Fire
Favorite Futures: CL & 6e, looking at ES, ZB and AU again.
 
ZTR's Avatar
 
Posts: 2,099 since Nov 2009
Thanks: 1,104 given, 1,390 received

I can do this in the afternoon, unless someone else can help Todd sooner?

Reply With Quote
The following user says Thank You to ZTR for this post:
 
  #8 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received

hi todd,
take the stuff you copied in the code off again and try that you get the indicator back to work. this would be the first step.

i think you wish something different than ztrade offered.
i post something the next few minutes.

max-td
Reply With Quote
 
  #9 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received

have a look in the cs.code below as example :

you have 2 wavefiles in there wich you are able to define in the variable-section of the indie. i think this is what you look for.

the first snippets you put in #region Variables

 
Code
                            
        #region Variables


        
private string     alertOBStoch    "AlertOBStoch.wav";     // Overbought Alert wav file
        
private string     alertOSStoch    "AlertOSStoch.wav";     // Oversold Alert wav file 
the next is for to put in #region Properties :
 
Code
                            
       #region Properties



        
[Description("Overbought Alert Wav File")]
        [
Category("Alert")]
        public 
string AlertOBStoch
        
{
            
get { return alertOBStoch; }
            
set alertOBStoch value; }
        }    
        
        [
Description("Oversold Alert Wav File")]
        [
Category("Alert")]
        public 
string AlertOSStoch
        
{
            
get { return alertOSStoch; }
            
set alertOSStoch value; }
        } 
then you add alertOSStoch / alertOBStoch instead of the wave-file-definition in your code.
i think its this :

"C:\\Program Files\\NinjaTrader 6.5\\sounds\\testlong.wav" -- now

"alertOSStoch" --- then


i think that does it.


...

max-td
Attached Files
Register to download File Type: cs Stoch_D_Color_Alert.cs (12.7 KB, 9 views)

Last edited by max-td; February 19th, 2010 at 07:44 AM.
Reply With Quote
The following 2 users say Thank You to max-td for this post:
 
  #10 (permalink)
Elite Member
Alpharetta, GA
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: Mirus / Zenfire
Favorite Futures: ES
 
Todd's Avatar
 
Posts: 257 since Jun 2009
Thanks: 28 given, 40 received


Max,

Thanks for your help.

I tried to copy and paste the code from your indicator into my indicator but I got several syntax errors. I'm guessing there were too many brackets or not enough brackets, etc.

Would you take the indicator that I've attached on the original post below and add your code to so the audio wave file fields will show up on the indicator settings input screen? I'm asking this because I think you will know how to deal with the syntax errors that I ran into.

If you could change the code and reattach it to a new post I would greatly appreciate it.

Todd

Reply With Quote

Reply



futures io > > > > > Need help with PKPriceAlert2 indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
PkPriceAlert2 for NT7 - need help Todd NinjaTrader Programming 43 November 22nd, 2014 12:53 PM


All times are GMT -4. The time now is 05:05 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.13 seconds with 20 queries on phoenix via your IP 54.90.92.204