Single line script translate please~~ - NinjaTrader Programming | futures io social day trading
futures io futures trading


Single line script translate please~~
Updated: Views / Replies:1,676 / 7
Created: by KFurious Attachments:2

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

Single line script translate please~~

  #1 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Intermediate
Platform: NinjaTrader, Metastock
Favorite Futures: ES, Stocks, HSI Futures
 
Posts: 3 since Jan 2011
Thanks: 2 given, 0 received

Single line script translate please~~

Hi there, could anybody transcript this single code for me plz? I'm not a programmer and the only programming language I can do is Metastock language...seems got a really big difference with it....ouch....

H-L>Mov(H-L,10,S)*2

Thank you very much~~

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
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary



KFurious View Post
Hi there, could anybody transcript this single code for me plz? I'm not a programmer and the only programming language I can do is Metastock language...seems got a really big difference with it....ouch....

H-L>Mov(H-L,10,S)*2

Thank you very much~~


This is the NinjaTrader code:

 
Code
High[0]-Low[0] > 2 * (SMA(High,10)[0] - SMA(Low,10)[0]);

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #4 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Intermediate
Platform: NinjaTrader, Metastock
Favorite Futures: ES, Stocks, HSI Futures
 
Posts: 3 since Jan 2011
Thanks: 2 given, 0 received

Thanks a lot Fat Tails~

Would you also tell me how can I make it just valid if the last bar's signal = false?

In Metastock, I just write like this...

Signal and ref(Signal,-1)=false

Thank you~~

Reply With Quote
 
  #5 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary


KFurious View Post
Thanks a lot Fat Tails~

Would you also tell me how can I make it just valid if the last bar's signal = false?

In Metastock, I just write like this...

Signal and ref(Signal,-1)=false

Thank you~~

NinjaTrader references the CurrentBar with [0], if you want to reference the previous bar, you would use [1]. The code would therefore be

 
Code
if (High[0]-Low[1] > 2 * (SMA(High,10)[1] - SMA(Low,10)[1]))
You can also print out the NinjaTrader help file (900 pages), you will find everything needed.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #6 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Intermediate
Platform: NinjaTrader, Metastock
Favorite Futures: ES, Stocks, HSI Futures
 
Posts: 3 since Jan 2011
Thanks: 2 given, 0 received

Thanks again Fat Tails, would you suggest any tutorial or ebook which cover more in details about NT programming?

Or should I learn C# first before that?

Reply With Quote
 
  #7 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary


KFurious View Post
Thanks again Fat Tails, would you suggest any tutorial or ebook which cover more in details about NT programming?

Or should I learn C# first before that?

I would suggest to dig through a book, something like "C# in 20 days". Then just copy and paste code from existing indicators and use the NinjaScript reference. That should do.

Reply With Quote
 
  #8 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

Need Help with MetaStock Code Please

Hello,
This is from a "Volume Momentum" Indicator from Barbara Star:


Quoting 
Barbara Star discusses volume variations. The title of the article is: Volume Variations.

Mov(ROC(Cum(If(C>(H+L)/2,V,If(C<(H+L)/2,-V,0))),12,$),10,S)

I'm not sure how to do the Cumulative portion of the formula. I'm also not sure about the "$".

Here's my attempt.
 
Code
//variables:
private int			emaperiod = 10;
		private int			rocperiod = 12;
		private DataSeries	_rocvol;
		

//Mov(ROC((Cum(If(C>(H+L)/2,V, If(C<(H+L)/2,-V,0)))),12,$),10,S)
bool aboveMid = (Close[0]>(High[0]+Low[0])/2);
bool belowMid = (Close[0]<(High[0]+Low[0])/2);

_rocvol.Set(aboveMid ? ROC(Volume,rocperiod)[0] : 
			belowMid ? -1*ROC(Volume,rocperiod)[0] : 0);
			
VolMom.Set(EMA(_rocvol,emaperiod)[0]);
Not sure what the end result would look like but I posted a screenshot of mine...

p.s., is there a MetaStock resource library for Ninjascript porting?

Attached Thumbnails
Single line script translate please~~-cl-11-15-4-unirenko-t4r14o7-10_7_2015.jpg  
Attached Files
Register to download File Type: cs VolumeMomentum_v01.cs (9.0 KB, 13 views)
Reply With Quote

Reply



futures io > > > > > Single line script translate please~~

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Translate Tradestation indicator to Ninja trader esam_jir NinjaTrader Programming 8 February 15th, 2014 01:38 AM
HELP!!! No more single click in booktrader with IB 906???? EuroMark IB Trader Workstation 19 November 14th, 2012 03:22 PM
Translate For Loop in Easy Language to NT C# Crassius NinjaTrader Programming 6 February 23rd, 2011 08:34 AM
What's the most anyone has lost in a single day? zwentz Traders Hideout 7 February 9th, 2011 09:09 PM
The dangers of a Single Story LordAlfa Off-Topic 0 December 8th, 2009 08:13 AM


All times are GMT -4. The time now is 02:47 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-11 in 0.09 seconds with 20 queries on phoenix via your IP 54.226.172.30