[NinjaTrader] Converting Multicharts variables to NinjaTrader - NinjaTrader Programming | futures io social day trading
futures io futures trading


Converting Multicharts variables to NinjaTrader
Updated: Views / Replies:381 / 4
Created: by jjsshh Attachments:0

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
 

Converting Multicharts variables to NinjaTrader

  #1 (permalink)
Trading Apprentice
Helsinki, Finland
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES,TY,NQ
 
Posts: 23 since Dec 2013
Thanks: 14 given, 4 received

Converting Multicharts variables to NinjaTrader

Hi,
I have a hard time to convert ELA indicators that are using loops to NT. The problem is that NT cannot use arrays similar ways ELA language is able to do. Here is an example of what I am trying to convert to NT (for loop is the problem):

inputs:
depth = 10;

Array:
iprice = close;
pBuffer[30](0);
price = iprice;
summ=0;

for x=0 to depth-1
begin
pbuffer[x] = price;
price = (pbuffer[x] + pbuffer[x][1])/2.0;
summ+= price;
end;

I first came up with NT code like this:

for(int i=0 ; i<depth; i++)
{
pBuffer[i][0]=price;
price= (pBuffer[i] + pBuffer[i+1])/2.0;
summ+= price;
}

But then I realized that the part pbuffer[x][1] is using array from previous bar, and not the value pBuffer[i+1] from the current bars array. I tried to change pBuffer to dataserie but it was not able to read arrays from previous bars. If someone have some ideas about how to handle this kind of code, please let me know.

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,216 since Jun 2009
Thanks: 628 given, 6,314 received
Forum Reputation: Legendary



jjsshh View Post
Hi,
I have a hard time to convert ELA indicators that are using loops to NT. The problem is that NT cannot use arrays similar ways ELA language is able to do. Here is an example of what I am trying to convert to NT (for loop is the problem):

inputs:
depth = 10;

Array:
iprice = close;
pBuffer[30](0);
price = iprice;
summ=0;

for x=0 to depth-1
begin
pbuffer[x] = price;
price = (pbuffer[x] + pbuffer[x][1])/2.0;
summ+= price;
end;

I first came up with NT code like this:

for(int i=0 ; i<depth; i++)
{
pBuffer[i][0]=price;
price= (pBuffer[i] + pBuffer[i+1])/2.0;
summ+= price;
}

But then I realized that the part pbuffer[x][1] is using array from previous bar, and not the value pBuffer[i+1] from the current bars array. I tried to change pBuffer to dataserie but it was not able to read arrays from previous bars. If someone have some ideas about how to handle this kind of code, please let me know.

in ninja you don't have to declare arrays for O,H,L,C you just simply call it Close[0] = currentprice, Close[1] = previous price etc... make sure you don't call out of bound i.e. you have only 5 bars and try to call Close[5]

Reply With Quote
The following 2 users say Thank You to cory for this post:
 
  #4 (permalink)
Trading Apprentice
Helsinki, Finland
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES,TY,NQ
 
Posts: 23 since Dec 2013
Thanks: 14 given, 4 received

Thanks cory for your advice,

but I am not sure if that help in this case. If I understand the code correct the problem is that the array pBuffer is not storing Close but instead it is storing this: price = (pbuffer[x] + pbuffer[x][1])/2.0; I have read a more about this thing and it seems that it is impossible to call an array from previous bar.

Reply With Quote
 
  #5 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,216 since Jun 2009
Thanks: 628 given, 6,314 received
Forum Reputation: Legendary


jjsshh View Post
Thanks cory for your advice,

but I am not sure if that help in this case. If I understand the code correct the problem is that the array pBuffer is not storing Close but instead it is storing this: price = (pbuffer[x] + pbuffer[x][1])/2.0; I have read a more about this thing and it seems that it is impossible to call an array from previous bar.

you don't need array pBuffer, the O,H,L,C of prices are auto maintained by Ninja and ready for you to use.

Reply With Quote

Reply



futures io > > > > > [NinjaTrader]    Converting Multicharts variables to NinjaTrader

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
Considering moving from Ninjatrader to MultiCharts Aufidius MultiCharts 2 June 27th, 2015 06:09 AM
Global Variables (GV) in EasyLanguage for TradeStation/MultiCharts Big Mike EasyLanguage Programming 19 October 29th, 2013 04:07 PM
NinjaTrader or Multicharts tom1 MultiCharts 113 October 7th, 2013 06:28 AM
Ninjatrader vs Multicharts ? buylosellhi Platforms and Indicators 23 August 25th, 2013 09:54 AM
Help converting CCI SQZ Zero Heat from TradeStation to NinjaTrader incometrade NinjaTrader Programming 2 January 28th, 2011 10:18 AM


All times are GMT -4. The time now is 03:31 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-13 in 0.09 seconds with 19 queries on phoenix via your IP 54.226.132.197