Help with EA - page 2

 
What I found interesting was the it was not the OP.
 

Oh,

please no more bad words. I apologize if I had hurt anybodys feelings. I can understand it's annoying with newbies permanently asking for coding help. But I think this ea only needs some little modifications that can be easily done. So many thanks for the coding.

To come back to the questions about what the problem was and what I had done: Well, I changed the code of the ema to a 62 ema and compiled the file again. But everytime I try to run this ea is still shows the ma period of 30 in its settings. The main problem is that I don't know if this is a 30 period sma or ema and I don't know how to change the code to make sure it is a 62 ema. That's all.

 
smoknfx:

not only does it look like the same old bs, but it is.

i have seen more than one thread where one person comes in with some totally lame question about his ea and would anybody mind looking at it?


Well get on an do what the OP asked for . . we will all applaud you for it.
 

MA=iMA(Symbol(),0,MA_Period,0,MODE_SMA,PRICE_CLOSE,i);

MA_Period is an external value that you enter when first starting the EA on a chart or you could change

extern double MA_Period=30;

to

extern double MA_Period=62;

You can see from the first line this post and the parameters of iMA() what the moving average is working with.

Please read the book before asking more questions.

 

@ Ickyrus,

thanks a lot for your help. I changed the value from 30 to 62 and also changed the setting "MODE_SMA" to "MODE_EMA" in the line you mentioned above. Hopefully now I will get this ea to work the way I want it to be.

The only thing I still don't understand are the "TP SL TS BE" settings in the ea itself. What value do I need to insert for the TS? Is it just that "1" stands for yes, I want to use a TS and "0" says no, I don't want a SL? Maybe it's because of these settings I get strange results when testing it with the strategy tester.

Greetings

Hubinator

 

Typically

TP = Take Profit Value

SL =Stop Loss Value

TS = Trailing Stop So 1 could be use it and 0 means do not use it these value should be Boolean i.e true or false internal value representation in computer languages varies or some other interpretation of Trailing Stop.

and the comment tells you that BE means break even - I would have to edit the code into a format that alows me to understand the logic it is working with and at the moment I am not prepared to spend time doing that.

 
Ickyrus:

Typically

TP = Take Profit Value

SL =Stop Loss Value

TS = Trailing Stop So 1 could be use it and 0 means do not use it these value should be Boolean i.e true or false internal value representation in computer languages varies or some other interpretation of Trailing Stop.

and the comment tells you that BE means break even - I would have to edit the code into a format that alows me to understand the logic it is working with and at the moment I am not prepared to spend time doing that.


Thanks for your help. That's how I thought the settings would work but I wasn't sure. I will test run this ea and see how it works.

Greetings

Hubinator

 

Please note - this is after I have edited the code so I can read it

    if (TS>0)
      {
       if ((pb-OrderOpenPrice())>TS*pp)
         {
          if (OrderStopLoss()<pb-(TS+TS_Step-1)*pp)
            {
             ModSL(pb-TS*pp);
             return;
            }
         }
      }

Whcih is saying

( pb=price bid pp=Point )

ModSL(value) modify stoploss to Bid price less trailingstop pips.

TS_Step stops modifcation until price move bigger than (TS+TS_Step-1 ) in pips.