Cross Abv/Blw - Double arrow question - NinjaTrader Programming | futures io social day trading
futures io futures trading


Cross Abv/Blw - Double arrow question
Updated: Views / Replies:2,487 / 15
Created: by Al2010 Attachments:8

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
 8  
 
Thread Tools Search this Thread
 

Cross Abv/Blw - Double arrow question

  #1 (permalink)
Trading for Fun
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 50 since Oct 2010
Thanks: 36 given, 10 received

Cross Abv/Blw - Double arrow question

Hello,
I'm new to C#-Ninja programming and cannot figure out the problem. Is there a way to display only one arrow per cross please? Please see attached screen shot. Is there error in the code(attached)?
I'd appreciate if anyone would be willing to help. This should be simple problem for any experienced programmer. And I hope it is not too much to ask to share your knowledge resolving this simple matter.
Thank you very much.

Attached Thumbnails
Cross Abv/Blw - Double arrow question-crossab_dblarrow.jpg  
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)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary


you could add a flag inside red arrow condition then check for it before moving on to orange arrow.

Reply With Quote
The following user says Thank You to cory for this post:
 
  #4 (permalink)
Trading for Fun
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 50 since Oct 2010
Thanks: 36 given, 10 received


cory View Post
you could add a flag inside red arrow condition then check for it before moving on to orange arrow.

Thank you. I tried flag but it does not work. I do not really know how to do this correctly. If you or anyone can share a small example then please do so.
I tried the following:

if (K[0] <= 80 && K[0] >= 70)
{
if (CrossBelow(Stochastics(PeriodD, periodK, smooth).K, 80, 1))
RedFlag = true;
DrawArrows(2, 9); // Red arrow
}
else if (K[0] <= 70 && K[0] >= 60)
{
if (CrossBelow(Stochastics(PeriodD, periodK, smooth).K, 70, 1))

if RedFlag == false
DrawArrows(2, 4); // Orange arrow
OrangeFlag = true;
}
RedFlag = false;
OrangeFlag = false;


Thank you in any case.

Reply With Quote
 
  #5 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,573 given, 3,982 received

How about using K[1] ?

 
Code
                            
if (K[0] <= 80 && K[0] >= 70){
  if (
CrossBelow(Stochastics(PeriodDperiodKsmooth).K801))
    
DrawArrows(29);  // Red arrow}
  
else 
    if (
K[0] <= 70 && K[0] >= 60) {
      if ( (
CrossBelow(Stochastics(PeriodDperiodKsmooth).K701))  && (K[1] < 70 || K[1] >80))
        
DrawArrows(24); // Orange arrow


Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #6 (permalink)
Trading for Fun
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 50 since Oct 2010
Thanks: 36 given, 10 received


sam028 View Post
How about using K[1] ?

 
Code
                            
if (K[0] <= 80 && K[0] >= 70){
  if (
CrossBelow(Stochastics(PeriodDperiodKsmooth).K801))
    
DrawArrows(29);  // Red arrow}
  
else 
    if (
K[0] <= 70 && K[0] >= 60) {
      if ( (
CrossBelow(Stochastics(PeriodDperiodKsmooth).K701))  && (K[1] < 70 || K[1] >80))
        
DrawArrows(24); // Orange arrow




Thank you very much!

Reply With Quote
 
  #7 (permalink)
Trading for Fun
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 50 since Oct 2010
Thanks: 36 given, 10 received


sam028 View Post
How about using K[1] ?

 
Code
                            
if (K[0] <= 80 && K[0] >= 70){
  if (
CrossBelow(Stochastics(PeriodDperiodKsmooth).K801))
    
DrawArrows(29);  // Red arrow}
  
else 
    if (
K[0] <= 70 && K[0] >= 60) {
      if ( (
CrossBelow(Stochastics(PeriodDperiodKsmooth).K701))  && (K[1] < 70 || K[1] >80))
        
DrawArrows(24); // Orange arrow



Almost works but still getting double arrows at some places and no arrows at other places where there used to be an arrow.
Thank you.

Reply With Quote
 
  #8 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,573 given, 3,982 received

Try to put some print (with Print() ) some values before each DrawArrows(), it will help you to find what's wrong in your logic.
With only a small part of the indicator, it's hard for us to find what could be wrong.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #9 (permalink)
Trading for Fun
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 50 since Oct 2010
Thanks: 36 given, 10 received


sam028 View Post
Try to put some print (with Print() ) some values before each DrawArrows(), it will help you to find what's wrong in your logic.
With only a small part of the indicator, it's hard for us to find what could be wrong.


Hello Sam,
First, I truly appreciate your help.
If you have time and will please see attached compiled .cs file. I'm using 6E 300 volume chart for my testing. There are many double arrows with the approach you have suggested. It is impossible for me to figure out what is wrong and how to fix it. If you can please help. If not then I still truly thank you very much.

Attached Thumbnails
Cross Abv/Blw - Double arrow question-dblarrow01.jpg   Cross Abv/Blw - Double arrow question-testcase_noarrow.jpg  
Attached Files
Register to download File Type: cs MyStochArrow.cs (12.5 KB, 12 views)
Reply With Quote
 
  #10 (permalink)
Elite Member
Dallas, TX
 
Futures Experience: Beginner
Platform: Ninjatrader
Broker/Data: Zen-Fire
Favorite Futures: ZN, 6E
 
gulabv's Avatar
 
Posts: 284 since May 2010
Thanks: 159 given, 155 received

COBC


Do you really need CalculateOnBarClose = false ?

The way this indicator is coded currently you could get multiple draw object painted on the chart for each 300 volume bar as the COBC = false setting analyzes your code on each incoming tick. I would think you want to set COBC = true so that your criteria is checked each time a bar completes. Not sure what you are trying to do so I can only speculate this might alleviate the problems you are seeing...

Hope this helps,
gulabv

Reply With Quote
The following user says Thank You to gulabv for this post:

Reply



futures io > > > > > Cross Abv/Blw - Double arrow question

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
Double bottom and Double top with DIV benbrooke NinjaTrader Programming 36 December 6th, 2011 01:29 PM
DOUBLE DOUBLE STOCHASTICS Jeff Castille The Elite Circle 112 September 5th, 2011 12:40 AM
Up and Down Arrow for 3rd bar from 9SMA psb1967 NinjaTrader Programming 6 November 3rd, 2010 01:02 PM
Add arrow to any alerts in indicators emini_Holy_Grail NinjaTrader Programming 2 August 29th, 2010 01:02 PM
Need help to create an up/down arrow in panel 1(price/candle area) alex123 NinjaTrader Programming 3 September 28th, 2009 07:06 PM


All times are GMT -4. The time now is 11:28 AM.

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-14 in 0.11 seconds with 20 queries on phoenix via your IP 54.227.51.103