NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript File Sharing > NinjaScript File Sharing Discussion

NinjaScript File Sharing Discussion Discussion for shared NinjaScript files.

Reply
 
Thread Tools Display Modes
Old 01-02-2009, 04:17 AM   #1
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Wink My code for FinWin system

Hello.
Does anybody know why i can't get my arrows closer to candles on any European market? On any American market is everything OK.

1st picture is European market FGBL. Second NQ.
My code is too long for this post. You can find it text format as a attachment.


I would be grateful for any help. THANK YOU.

Thank you so much. GE.
Attached Images
File Type: jpg Image00001.jpg (94.3 KB, 305 views)
File Type: jpg Image00002.jpg (96.3 KB, 214 views)
File Type: jpg indic-propert copy.jpg (69.9 KB, 134 views)
Attached Files
File Type: txt finwin_code.txt (10.1 KB, 130 views)
genius75 is offline  
Reply With Quote
Old 01-02-2009, 04:40 AM   #2
TAJTrades
Senior Member
 
Join Date: Dec 2007
Location: Atlanta
Posts: 281
Thanks: 0
Thanked 4 times in 3 posts
Default

Try replacing all DrawArrow code:

DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1, Color.Red);

With:

DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1*TickSize, Color.Red);

thereby creating arrows that are set a fixed number of ticks from the bar
TAJTrades is offline  
Reply With Quote
Old 01-02-2009, 04:49 AM   #3
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Thanks for this useful advise TAJTrades!
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-02-2009, 09:41 PM   #4
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Unhappy Hello

Thank you for your time but it did not work.

As you can see on my pictures it works on US market, but not on European

No clue why.

Thank you for any help.
Attached Images
File Type: jpg FGBL 03-09 12_30_2008 (8 Range).jpg (93.8 KB, 159 views)
File Type: jpg NQ 03-09 12_30_2008 (8 Range).jpg (93.6 KB, 101 views)
genius75 is offline  
Reply With Quote
Old 01-03-2009, 07:09 AM   #5
thrunner
Member
 
Join Date: May 2007
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Default

It should work. Try replacing ALL DrawArrow (Up and Down) and DrawText with n*TickSize and vary the value 'n'.
Attached Images
File Type: gif FGBL_FW.png (41.5 KB, 307 views)
thrunner is offline  
Reply With Quote
Old 01-03-2009, 09:44 PM   #6
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by thrunner View Post
It should work. Try replacing ALL DrawArrow (Up and Down) and DrawText with n*TickSize and vary the value 'n'.

Could you please send me a PM with that code.

It really doesn't work for me.

Thank you.
genius75 is offline  
Reply With Quote
Old 01-04-2009, 02:29 AM   #7
cls71
Senior Member
 
Join Date: Jan 2008
Location: Madrid, Spain
Posts: 229
Thanks: 2
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by TAJTrades View Post
Try replacing all DrawArrow code:

DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1, Color.Red);

With:

DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1*TickSize, Color.Red);

thereby creating arrows that are set a fixed number of ticks from the bar

Hello,

try 1.0 * TickSize.

Code:
DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1.0*TickSize, Color.Red);
cls71 is offline  
Reply With Quote
Old 01-04-2009, 04:00 AM   #8
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by cls71 View Post
Hello,

try 1.0 * TickSize.

Code:
DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1.0*TickSize, Color.Red);
Thank you for your time, but I can't save it with this

CS0103 error ....

Any other idea?
genius75 is offline  
Reply With Quote
Old 01-04-2009, 04:37 AM   #9
cls71
Senior Member
 
Join Date: Jan 2008
Location: Madrid, Spain
Posts: 229
Thanks: 2
Thanked 0 times in 0 posts
Default

CS0103 is an error about variables declaration.

The sentence:
Code:
DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1.0*TickSize, Color.Red);
is correct.

I think that your code have an error in other place, but not in DrawArrowDown ...

If you post the code maybe I could help you.
cls71 is offline  
Reply With Quote
Old 01-04-2009, 09:25 AM   #10
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Default My code attached

Quote:
Originally Posted by cls71 View Post
CS0103 is an error about variables declaration.

The sentence:
Code:
DrawArrowDown("Down" + CurrentBar, true, 0, High[0] + 1.0*TickSize, Color.Red);
is correct.

I think that your code have an error in other place, but not in DrawArrowDown ...

If you post the code maybe I could help you.
My code attached
Attached Files
File Type: txt finwin2.txt (10.4 KB, 149 views)
genius75 is offline  
Reply With Quote
Old 01-04-2009, 09:46 AM   #11
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Hi, try using TickSize (remember NinjaScript is case sensitive), then your posted code should work.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-04-2009, 10:48 PM   #12
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Thumbs up

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
Hi, try using TickSize (remember NinjaScript is case sensitive), then your posted code should work.

YES!!!!!!!!!!!

THANK YOU SO MUCH!!!!

IT WORKS!!

THANK YOU GUYS!!

Have a successful year 2009!!
genius75 is offline  
Reply With Quote
Old 01-05-2009, 12:10 AM   #13
vrathee
Member
 
Join Date: Nov 2008
Posts: 62
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by genius75 View Post
YES!!!!!!!!!!!

THANK YOU SO MUCH!!!!

IT WORKS!!

THANK YOU GUYS!!

Have a successful year 2009!!
Can somebody post the complete Zip file of the same.

Regards
vrathee is offline  
Reply With Quote
Old 01-05-2009, 12:27 AM   #14
genius75
Junior Member
 
Join Date: Apr 2008
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Thumbs up

Quote:
Originally Posted by vrathee View Post
Can somebody post the complete Zip file of the same.

Regards

Hi there.

Here is your zip file.
Attached Files
File Type: zip FinWin.zip (5.2 KB, 340 views)
Last edited by genius75; 01-05-2009 at 02:18 AM.
genius75 is offline  
Reply With Quote
Old 01-05-2009, 02:11 AM   #15
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Great you got it working, a happy 2009 to you as well.

To export a NinjaScript file go to File > Utilities > Export NinjaScript.

To get rid of any prorgramming errors showing up in your files then, please see this tip - http://www.ninjatrader-support2.com/...ead.php?t=4678
NinjaTrader_Bertrand 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
system.math DaveS General Programming 5 12-07-2008 03:39 PM
using System.Data pauljff General Programming 5 10-05-2008 02:55 PM
multi-time frame code and entry code Mark_486 General Programming 1 05-15-2008 11:54 AM
Trading System abikambic General Programming 1 03-18-2008 06:22 AM
Code->test/debug->change code->retest ... cycle process bbarroux Strategy Development 3 10-02-2007 12:44 PM


All times are GMT -6. The time now is 01:06 PM.