Problem with my EA Strategic Swiss

 
Chuck Le Beau's System Traders Club Strategic Swiss Trading System

i have convert The Tradestation System ela file

LE BEAU C. - ' Crossbow Swiss Franc 1.0 ' Trading System.doc

help please my MQL EA code

--

Files:
crossbow.mq4  7 kb
 

i not understand

this ELA code

-----Functions Used in the Code---------

{---Function MaxTradeClose---}

if marketposition 1 then MaxTradeClose=-999999;

if marketposition=1 and C>MaxtradeClose[1] then MaxtradeClose=C;

{---Function MinTradeClose---}

if marketposition -1 then MinTradeClose=999999;

if marketposition=-1 and C<MinTradeClose[1] then MinTradeClose=C;

{---Function MaxTradeHigh---}

if marketposition 1 then MaxTradeHigh=-999999;

if marketposition=1 and H>MaxtradeHigh[1] then MaxtradeHigh=H;

{---Function MinTradeLow---}

if marketposition -1 then MinTradeLow=999999;

if marketposition=-1 and L<MinTradeLow[1] then MinTradeLOw=L;

 

marketposition == 1 --> Long

marketposition == 0 --> No trades

marketposition == -1 --> Short

MaxtradeClose == First Item of array MaxTradeClose == Value of that array for current bar

So .. MaxTradeClose (in ELA) = MaxTradeClose[0] (in mq4).

MinTradeLow, MaxTradeClose ... and those variables are array used for temporal calculation based on calculation.

Alex.Piech.FinGeR:
i not understand

this ELA code

-----Functions Used in the Code---------

{---Function MaxTradeClose---}

if marketposition 1 then MaxTradeClose=-999999;

if marketposition=1 and C>MaxtradeClose[1] then MaxtradeClose=C;

{---Function MinTradeClose---}

if marketposition -1 then MinTradeClose=999999;

if marketposition=-1 and C<MinTradeClose[1] then MinTradeClose=C;

{---Function MaxTradeHigh---}

if marketposition 1 then MaxTradeHigh=-999999;

if marketposition=1 and H>MaxtradeHigh[1] then MaxtradeHigh=H;

{---Function MinTradeLow---}

if marketposition -1 then MinTradeLow=999999;

if marketposition=-1 and L<MinTradeLow[1] then MinTradeLOw=L;
 

MaxtradeClose == First Item of array MaxTradeClose == Value of that array for current bar

i not understand

 
Alex.Piech.FinGeR:
MaxtradeClose == First Item of array MaxTradeClose == Value of that array for current bar

i not understand

You have an array called MaxTradeClose.

MaxTradeClose[0] --> Value for current bar

MaxTradeClose[1] --> Value of previous bar

MaxTradeClose[2] --> Value of previous to previous bar ....

MaxTradeClose[0] in ELA can be reduced to MaxTradeClose

 

Are the arrays your problem?

Alex.Piech.FinGeR:
MaxtradeClose == First Item of array MaxTradeClose == Value of that array for current bar

i not understand

Review lesson 11:

Arrays:

In our life we usually group similar objects into units, in the programming we also need to group together the data items of the same type. We use Arrays to do this task.

Arrays are very like the list tables, you group the items in the table and access them the number of the row. Rows in the Arrays called Indexes.

To declare an array you use a code like that:

int my_array[50];

Here, you have declared an array of integer type, which can hold up to 50 items.

You can access each item in the array using the index of the item, like that:

My_array[10] = 500;

Here, you have set the item number 10 in the array to 500.

You can initialize the array at the same line of the declaration like that:

int my_array[5] = {1,24,15,66,500};

In MQL4:

MaxTradeClose[0] is the first item in the array MaxTradeClose.

MaxTradeClose[1] is th second item.

MaxTradeClose[2] is the third item. etc..

But in EasyLnaguage the Array starts with the index 1 so,

MaxTradeClose[1] is the first item in the array MaxTradeClose.

MaxTradeClose[2] is th second item.

MaxTradeClose[3] is the third item. etc..

So, what's your question?

 
codersguru:
Review lesson 11:

In MQL4:

MaxTradeClose[0] is the first item in the array MaxTradeClose.

MaxTradeClose[1] is th second item.

MaxTradeClose[2] is the third item. etc..

But in EasyLnaguage the Array starts with the index 1 so,

MaxTradeClose[1] is the first item in the array MaxTradeClose.

MaxTradeClose[2] is th second item.

MaxTradeClose[3] is the third item. etc..

So, what's your question?

This is the question:

MaxtradeClose=C;

 

Hello Alex, do you understand now the code?

 

Thanks all

yes i understand

 

Alex,

Did you manage to write an EA and test the strategy?

 

Later

i have new Project

Reason: