NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-07-2009, 06:49 AM   #1
pmn100
Junior Member
 
Join Date: Aug 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default Draw Arrow if Bar Over Certain Pip Size

Hi

I'm struggling to get even the simplest scripts to run here. I have some 5 minute data from IB for the currency pair GBP/USD. The pair is loaded into the strategy analyser and I can right click the pair to run a back test, pull up a chart, etc. I've got a simple script as follows to print some text if a bar high is greater than the low (text on every bar right?) but still nothing prints on the chart after the test is run.

Script:

if (High[0] > Low[0])
{
DrawText(
"My text" + CurrentBar, "here", 0, 0, Color.Red);
}


So can someone help me get the basics working for me here and get the text or an arrow to print on backtest, and secondly, how would I code this strategy so that I can identify bars over a certain pip size?

From then on I should be able to figure the rest out.

Thanks
pmn100 is offline  
Reply With Quote
Old 09-07-2009, 07:26 AM   #2
ninjablanks
Member
 
Join Date: Aug 2007
Posts: 64
Thanks: 0
Thanked 0 times in 0 posts
Default Draw Arrow if Bar Over Certain Pip Size

Use the Strategy wizard
1 Create new strategy
2) High > Low (use offset here to show large pip size)
3) Go to bottom pane "Do the following"
4) Click "add"
5) Click "drawing"
6) Click "up arrow"
7) Click "Y" and select where you want arrow to appear (Example low of bar)
8) Click next until done

The strategy wizard is easier to use than indicator wizard. Trt it I think you will see it is easy to make fairly complex strategies

I hope this helps
ninjablanks is offline  
Reply With Quote
Old 09-07-2009, 07:44 AM   #3
pmn100
Junior Member
 
Join Date: Aug 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by ninjablanks View Post
Use the Strategy wizard
1 Create new strategy
2) High > Low (use offset here to show large pip size)
3) Go to bottom pane "Do the following"
4) Click "add"
5) Click "drawing"
6) Click "up arrow"
7) Click "Y" and select where you want arrow to appear (Example low of bar)
8) Click next until done

The strategy wizard is easier to use than indicator wizard. Trt it I think you will see it is easy to make fairly complex strategies

I hope this helps
And its working

Thanks very much, appreciate your time.
pmn100 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I draw an arrow that stays on the top or bottom of a price chart? atangram Indicator Development 9 12-18-2010 02:59 PM
Size of arrow/diamond etc? ju1234 Strategy Development 7 08-22-2009 11:19 AM
Can draw dot, arrow, etc. but cannot draw line cunparis Strategy Development 10 03-21-2009 01:44 AM
draw arrow based on another drawing object duck_CA NinjaScript File Sharing Discussion 3 08-25-2008 03:18 PM
Draw Object Size in code??? higler General Programming 1 05-10-2008 02:21 PM


All times are GMT -6. The time now is 03:36 AM.