![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Aug 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
Member
Join Date: Aug 2007
Posts: 64
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Aug 2008
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
![]() Thanks very much, appreciate your time. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |