NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM 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 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 10-18-2010, 02:19 PM   #1
anatop
Junior Member
 
Join Date: Oct 2010
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default Converting EL code to Ninja code

Hi
Would anybody be willing to convert the enclosed EL code from Tradestation
so I can use it in Ninja Trader Charting.
Thank you

--------------------------------------------------------------------

Inputs: Len1(3),Price1(AvgPrice),Price2(High),Price3(Low), fac(.0382);


Plot1 (Value1(price2,fac),"PrcntAbv");

Plot2 (Value1(price3,fac),"PrcntBlw");

Plot3(XAverage(Price1,Len1),"Bullseye");

if Value1(price2,fac) > Value1(price2,fac)[1] then begin
Plot4 (Value1(price2,fac),"PrcntAbv+");
end;
if Value1(price3,fac) < Value1(price3,fac)[1] then begin
Plot5(Value1(price3,fac),"PrcntBlw-");
end;


----This is calc for Value1------MWDXAverage------------

VARS : FACTOR(0);
VALUE2=2/FAC-1;

IF VALUE2 + 1 <> 0 THEN BEGIN

IF CURRENTBAR <= 1 THEN BEGIN

FACTOR = 2 / (VALUE2 + 1);

VALUE1 = PRICE;

END

ELSE

VALUE1 = FACTOR * PRICE + (1 - FACTOR) * VALUE1[1];

END;
----------------------------------------------------------------------
anatop is offline  
Reply With Quote
Old 10-18-2010, 02:23 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello anatop,

Welcome to the NinjaTrader forums!

Hopefully another community member can offer translation for you. You may also consider a NinjaScript consultant, who can be hired for this type of service:
http://www.ninjatrader.com/webnew/pa...injaScript.htm
NinjaTrader_RyanM 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
Trouble Converting 6.5 code to 7 ThatManFromTexas Version 7 Beta General Questions & Bug Reports 3 04-19-2010 11:02 AM
Convert small EL code to NinjaScript. Lobo Indicator Development 7 12-18-2009 03:21 PM
how to program Farley's accumulation distribution accelerator? (see EL code) suedeuno Indicator Development 3 01-12-2009 02:17 PM
Converting from eSignal to Ninja code tiara50 General Programming 5 12-24-2008 11:57 AM
Help converting EL to Ninja chartlearner General Programming 2 12-11-2008 01:20 PM


All times are GMT -6. The time now is 01:14 AM.