Welcome to the Traders Laboratory.

Coding Forum Collaborate, receive help, or discuss indicators and other coding-related topics

Like Tree1Likes
Reply
Old 09-26-2011, 10:05 PM   #25

Join Date: Mar 2009
Posts: 27
Ignore this user

Thanks: 8
Thanked 5 Times in 5 Posts

Re: Convert MT4 Indicator into Tradestation Eld?

Quote:
Originally Posted by Tams »
if you have tried, but are unwilling to share your "efforts",
what chances are someone would like to collaborate in this ?
i understand what you meant and i'd like to share anything i have. but i really have nothing.
i meant was i just tried to write some pseudo code to know if it's possible by myself.
r4bb1t is offline  
Reply With Quote
Old 09-27-2011, 12:13 PM   #26

Tradewinds's Avatar

Join Date: Nov 2008
Posts: 910
Ignore this user

Thanks: 379
Thanked 257 Times in 178 Posts

Re: Convert MT4 Indicator into Tradestation Eld?

Quote:
Originally Posted by Tradewinds »
Here is some really simple code that I create:
That code doesn't work. This does:

Time On Chart - TradeStation at Traders Laboratory
Tradewinds is offline  
Reply With Quote
Old 10-14-2011, 12:04 PM   #27

Join Date: Oct 2011
Posts: 1
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Convert MT4 Indicator into Tradestation Eld?

I have an ATR code that i'd like converted to Tradestations EasyLanguage if someone has a chance?

2011-10-14_0902 - xpete911's library


Code:
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 White
#property indicator_color2 Red

extern int Length = 15;
extern int ATRperiod = 2;
extern double Kv = 4.0;
extern int Shift = 1;
double g_ibuf_96[];
double g_ibuf_100[];
double g_ibuf_104[];
double g_ibuf_108[];
double g_ibuf_112[];

int init() {
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2);
   IndicatorBuffers(5);
   SetIndexBuffer(0, g_ibuf_96);
   SetIndexBuffer(1, g_ibuf_100);
   SetIndexBuffer(2, g_ibuf_104);
   SetIndexBuffer(3, g_ibuf_108);
   SetIndexBuffer(4, g_ibuf_112);
   string ls_0 = "ATRStops(" + Length + ")";
   IndicatorShortName(ls_0);
   SetIndexLabel(0, "Up");
   SetIndexLabel(1, "Dn");
   SetIndexDrawBegin(0, Length);
   SetIndexDrawBegin(1, Length);
   return (0);
}

int start() {
   int li_4;
   int l_ind_counted_8 = IndicatorCounted();
   if (l_ind_counted_8 > 0) li_4 = Bars - l_ind_counted_8;
   if (l_ind_counted_8 < 0) return (0);
   if (l_ind_counted_8 == 0) li_4 = Bars - Length - 1;
   for (int li_0 = li_4; li_0 >= 0; li_0--) {
      g_ibuf_104[li_0] = High[iHighest(NULL, 0, MODE_HIGH, Length, li_0 + Shift)] - Kv * iATR(NULL, 0, ATRperiod, li_0 + Shift);
      g_ibuf_108[li_0] = Low[iLowest(NULL, 0, MODE_LOW, Length, li_0 + Shift)] + Kv * iATR(NULL, 0, ATRperiod, li_0 + Shift);
      g_ibuf_112[li_0] = g_ibuf_112[li_0 + 1];
      if (Close[li_0] > g_ibuf_108[li_0 + 1]) g_ibuf_112[li_0] = 1;
      if (Close[li_0] < g_ibuf_104[li_0 + 1]) g_ibuf_112[li_0] = -1;
      if (g_ibuf_112[li_0] > 0.0) {
         if (g_ibuf_104[li_0] < g_ibuf_104[li_0 + 1]) g_ibuf_104[li_0] = g_ibuf_104[li_0 + 1];
         g_ibuf_96[li_0] = g_ibuf_104[li_0];
         g_ibuf_100[li_0] = EMPTY_VALUE;
      }
      if (g_ibuf_112[li_0] < 0.0) {
         if (g_ibuf_108[li_0] > g_ibuf_108[li_0 + 1]) g_ibuf_108[li_0] = g_ibuf_108[li_0 + 1];
         g_ibuf_96[li_0] = EMPTY_VALUE;
         g_ibuf_100[li_0] = g_ibuf_108[li_0];
      }
   }
   return (0);
}
xpete is offline  
Reply With Quote
Old 12-21-2013, 08:21 AM   #28

Join Date: Jul 2009
Location: kazan
Posts: 1
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Convert MT4 Indicator into Tradestation Eld?

hey is anybody can convert mt4/eld to the OEC platform *.el
Attached Files
File Type: eld ConnorsRSI.ELD (7.2 KB, 121 views)
File Type: mq4 Connors RSI (1).mq4 (2.2 KB, 92 views)
mixpol is offline  
Reply With Quote
Old 07-10-2014, 05:37 PM   #29

Join Date: Jul 2014
Posts: 25
Ignore this user

Thanks: 2
Thanked 1 Time in 1 Post

MA_WRP indicator

Hi phim9hi3n,

Many thank for your MA_WRP indicator

Best regards,

Derek2209
derek2209 is offline  
Reply With Quote
Old 11-05-2015, 01:33 PM   #30

Join Date: Aug 2012
Posts: 3
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Convert MT4 Indicator into Tradestation Eld?

I want to convert following Elliotwave MT4 to tradestation ELD

//+------------------------------------------------------------------+
//| elliot oscillator - waves.mq4 |
//+------------------------------------------------------------------+
#property copyright "mladen"
#property link "mladenfx@gmail.com"

#property indicator_separate_window
#property indicator_buffers 6
#property indicator_color1 DeepSkyBlue
#property indicator_color2 PaleVioletRed
#property indicator_color3 Gold
#property indicator_color4 Gold
#property indicator_color5 DimGray
#property indicator_color6 DimGray
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_width4 2
#property indicator_width5 2
#property indicator_width6 2

//
//
//
//
//

extern int shortPeriod = 5;
extern int longPeriod = 35;
extern string linesIdentifier = "elliotWaveLines";
extern color linesColor = Black;
extern int linesStyle = STYLE_DOT;
extern int levelsShiftRight = 10;
extern int levelsLength = 20;
extern color levelsColor = Silver;
extern int levelsStyle = STYLE_SOLID;

extern bool alertsOn = false;
extern bool alertsOnCurrent = true;
extern bool alertsMessage = true;
extern bool alertsSound = false;
extern bool alertsEmail = false;

//
//
//
//
//

double ellBuffer[];
double ellUBuffer[];
double ellDBuffer[];
double mauBuffer[];
double madBuffer[];
double peakUp[];
double peakDn[];
double trend[];

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

int init()
{
IndicatorBuffers(8);
SetIndexBuffer(0,ellUBuff er); SetIndexStyle(0,DRAW_HIST OGRAM);
SetIndexBuffer(1,ellDBuff er); SetIndexStyle(1,DRAW_HIST OGRAM);
SetIndexBuffer(2,peakUp); SetIndexStyle(2,DRAW_HIST OGRAM);
SetIndexBuffer(3,peakDn); SetIndexStyle(3,DRAW_HIST OGRAM);
SetIndexBuffer(4,mauBuffe r);
SetIndexBuffer(5,madBuffe r);
SetIndexBuffer(6,trend);
SetIndexBuffer(7,ellBuffe r);
IndicatorShortName("Ellio t oscillator ( "+shortPeriod+","+longPer iod+")");
return(0);
}
int deinit() { deleteLines(); return(0); }

//
//
//
//
//

int start()
{
double alpha = 2.0/(1.0+longPeriod+MathCeil( shortPeriod/2.0));
int counted_bars = IndicatorCounted();
int limit,i,k;

if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars--;
limit = MathMin(Bars-counted_bars,Bars-longPeriod);

//
//
//
//
//

int count = 0;
int direction = 0;
int startFrom = 0;
double lastPeakPrice = 0;
datetime lastPeakTime = 0;
for (;limit<(Bars-longPeriod); limit++)
{
if (peakDn[limit]!=EMPTY_VALUE) { if (count==0) { count ++; continue; } direction=-1; startFrom = limit; break; }
if (peakUp[limit]!=EMPTY_VALUE) { if (count==0) { count ++; continue; } direction= 1; startFrom = limit; break; }
}

//
//
//
//
//

for(i = limit; i >= 0; i--)
{
ellBuffer[i] = iMA(NULL,0,shortPeriod,0, MODE_SMA,PRICE_MEDIAN,i)-iMA(NULL,0,longPeriod,0,M ODE_SMA,PRICE_MEDIAN,i);
ellUBuffer[i] = EMPTY_VALUE;
ellDBuffer[i] = EMPTY_VALUE;

if (mauBuffer[i+1]==EMPTY_VALUE) if (ellBuffer[i]>0) mauBuffer[i+1] = ellBuffer[i]; else mauBuffer[i+1] = 0;
if (madBuffer[i+1]==EMPTY_VALUE) if (ellBuffer[i]<0) madBuffer[i+1] = ellBuffer[i]; else madBuffer[i+1] = 0;

madBuffer[i] = madBuffer[i+1];
mauBuffer[i] = mauBuffer[i+1];
trend[i] = trend[i+1];
peakUp[i] = EMPTY_VALUE;
peakDn[i] = EMPTY_VALUE;

//
//
//
//
//

if (ellBuffer[i] < 0) { madBuffer[i] = madBuffer[i+1]+alpha*(ellBuffer[i]-madBuffer[i+1]); ellDBuffer[i] = ellBuffer[i]; }
if (ellBuffer[i] > 0) { mauBuffer[i] = mauBuffer[i+1]+alpha*(ellBuffer[i]-mauBuffer[i+1]); ellUBuffer[i] = ellBuffer[i]; }
deleteLine(i);

//
//
//
//
//

if (ellBuffer[i] > 0 && ellBuffer[i]>mauBuffer[i])
{
if (direction < 0) { markLow(i,startFrom,lastP eakPrice,lastPeakTime); startFrom = i; k++; }
direction = 1; trend[i] = 1;
}
if (ellBuffer[i] < 0 && ellBuffer[i]<madBuffer[i])
{
if (direction > 0) { markHigh(i,startFrom,last PeakPrice,lastPeakTime); startFrom = i; k++; }
direction = -1; trend[i] = -1;
}
}
if (direction > 0) markHigh(0,startFrom,last PeakPrice,lastPeakTime);
if (direction < 0) markLow (0,startFrom,lastPeakPric e,lastPeakTime);
if (alertsOn)
{
if (alertsOnCurrent)
int whichBar = 0;
else whichBar = 1;
if (trend[whichBar] != trend[whichBar+1])
{
if (trend[whichBar] == 1) doAlert(whichBar,DoubleTo Str(mauBuffer[whichBar],5)+" crossed up");
if (trend[whichBar] ==-1) doAlert(whichBar,DoubleTo Str(madBuffer[whichBar],5)+" crossed down");
}
}

//
//
//
//
//

return(0);
}

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

void markLow(int start, int end, double& lastPeakPrice, datetime& lastPeakTime)
{
while (ellBuffer[start+1]>0 && start<Bars) start++;
while (ellBuffer[end+1] <0 && end <Bars) end++;
int peakAt = ArrayMinimum(Low,end-start+1,start); peakDn[peakAt] = ellBuffer[peakAt];

//
//
//
//
//

if (lastPeakPrice!=0) drawLine(lastPeakPrice,la stPeakTime,Low[peakAt],Time[peakAt]);
lastPeakPrice = Low[peakAt];
lastPeakTime = Time[peakAt];
}
void markHigh(int start, int end, double& lastPeakPrice, datetime& lastPeakTime)
{
while (ellBuffer[start+1]<0 && start<Bars) start++;
while (ellBuffer[end+1] >0 && end <Bars) end++;
int peakAt = ArrayMaximum(High,end-start+1,start); peakUp[peakAt] = ellBuffer[peakAt];

//
//
//
//
//

if (lastPeakPrice!=0) drawLine(lastPeakPrice,la stPeakTime,High[peakAt],Time[peakAt]);
lastPeakPrice = High[peakAt];
lastPeakTime = Time[peakAt];
}

//
//
//
//
//

void drawLine(double startPrice, datetime startTime, double endPrice, datetime endTime)
{
string name = linesIdentifier+":"+start Time;
ObjectCreate(name,OBJ_TRE ND,0,startTime,startPrice ,endTime,endPrice);
ObjectSet(name,OBJPROP_ST YLE,linesStyle);
ObjectSet(name,OBJPROP_CO LOR,linesColor);
ObjectSet(name,OBJPROP_RA Y,false);
}
void deleteLine(int i)
{
ObjectDelete(linesIdentif ier+":"+Time[i]);
}
void deleteLines()
{
string lookFor = linesIdentifier+":";
for (int i=ObjectsTotal(); i>=0; i--)
{
string name = ObjectName(i);
if (StringFind(name,lookFor) ==0) ObjectDelete(name);
}
}

//+-------------------------------------------------------------------
//|
//+-------------------------------------------------------------------
//
//
//
//
//

void doAlert(int forBar, string doWhat)
{
static string previousAlert="nothing";
static datetime previousTime;
string message;

if (previousAlert != doWhat || previousTime != Time[forBar]) {
previousAlert = doWhat;
previousTime = Time[forBar];

//
//
//
//
//

message = StringConcatenate(Symbol( )," at ",TimeToStr(TimeLocal(),T IME_SECONDS)," Elliot oscillator level ",doWhat);
if (alertsMessage) Alert(message);
if (alertsEmail) SendMail(StringConcatenat e(Symbol(),"Elliot oscillator "),message);
if (alertsSound) PlaySound("alert2.wav");
}
}
ravidevt is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Tradestation Market Profile Indicator? agabr Coding Forum 6 08-12-2011 05:23 PM
Bid-Ask Pressure Indicator for Tradestation Soultrader Trading Indicators 81 08-18-2009 03:29 PM
Alchemy TradeStation Indicator Package captjoe Coding Forum 1 11-29-2008 08:05 PM
Colby Indicator For Tradestation slableak Brokers and Data Feeds 12 11-29-2008 10:23 AM
BRICKS Indicator for Tradestation Soultrader Trading Indicators 8 02-23-2008 09:10 PM

All times are GMT -4. The time now is 12:03 PM.
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
2006-2011 Traders Laboratory, All Rights Reserved.