EasyLanguage indicators and functions with source code

#1
Hello everyone,

I am beginning this thread to share whatever little I have produced in terms of indicators and functions for EasyLanguage. I am new to EasyLanguage so do not expect anything fancy. I will be sharing the source code so you can see that my code is very basic. This way I am also welcoming feedback from more experienced EasyLanguage developers.

I will be pasting the code directly in my posts unless someone teaches me a better way to share functions and indicators in source code format for TS ecosystem.

I start my function names with F_ and indicators with I_ and then use the same names for both after that.

The reason I code functions separately from indicators is because I need to call them from my strategies (there is no iCustom in TS)

Let's collaborate


Re: EasyLanguage indicators and functions with source code

#2
G-Channels

Here is the first indicator I converted to EasyLanguage after seeing a lot of positive noise about it on a number of MT4 threads.

This I think is the original post where MT4 version of G-Channels was posted - viewtopic.php?p=1295491801#p1295491801

The EasyLanguage version does not come with fancy features like MTF or colour changes (mainly because I do not know yet how to do that in EasyLanguage)
G-Channels.png

Function - F_GChannels

Code: Select all

Inputs:
	int Inp_Length(NumericSimple),
	double Inp_Top(NumericRef),
	double Inp_Middle(NumericRef),
	double Inp_Bottom(NumericRef);

Variable:
	double top(0), middle(0), bottom(0);	

top  = Maxlist(C, top[1])  - (top[1] - bottom[1])/Inp_Length;
bottom = Minlist(C, bottom[1]) + (top[1] - bottom[1])/Inp_Length;
middle = (top + bottom) / 2;

Inp_Top = top;
Inp_Middle = middle;
Inp_Bottom = bottom;

F_GChannels = Inp_Middle;
Indicator - I_GChannels

Code: Select all

Inputs:
	int Length(10);
	
Variables:
	double top(0), middle(0), bottom(0);
	
middle = F_GChannels(Length, top, middle, bottom);

Plot1(top);
Plot2(middle);
Plot3(bottom);
Attachments 1
  1. Similar Topics

    1. 3 Replies
      2917 Views
    2. Help understanding indicator functions

      4 Replies 1108 Views

      by tkhanfx, Tue Jun 11, 2019 5:43 am in MT4 Indicators

      4 Replies
      1108 Views

Return to “TradeStation Forum”

Users viewing this forum: CommonCrawl [Bot] and 0 guests