How I can made a Expert Advisor of a Indicator? - page 3

 

Hello tcl,

I think here is what you want.

It seems that this is not a scalping system, but a variation of short period counter trade.

Anyway, as I tested in EUR/USD 15min TF, It worked fairly well (at least not so bad).

I have not verified so much if it is working as you wrote or not,

but I coded according to your entry rules.

You can see details by visual backtest or fowardtest if it is working correctly or not.

1) Most of settings and features are the same as former versions.

2) This system is locked not to work on except M15 TF. (It can be unlocked from the settings if you want)

required custom indicators

* maybe unnecessary if you don't use S/R TP method.

have fun

Files:
 

excellent

latimeria:
Hello tcl,

I think here is what you want.

It seems that this is not a scalping system, but a variation of short period counter trade.

Anyway, as I tested in EUR/USD 15min TF, It worked fairly well.

I have not verified so much if it is working as you wrote or not,

but I coded according to your entry rules.

You can see details by visual backtest or fowardtest if it is working correctly or not.

1) Most of settings and features are the same as former versions.

2) This system is locked not to work on except M15 TF. (It can be unlocked from the settings if you want)

required custom indicators

* maybe unnecessary if you don't use S/R TP method.

have fun

I tried to backtest your EA with GU Pairs and I got error:

1999.01.05 10:15 SDL_TE2_LWMA_v1 GBPUSD,M15: zero divide

and I got the same error with GJ pairs

 

As I tested the EA on my GBP/USD or GBP/JPY AlpariUK demo data (15M Open price only) no zefo devide error happens.

I don't have not so long term data as you and can't reproduce your situation.

Do you mean you can't even backtest this EA at all?

Is the same thing happening to others who downloaded this EA?

Again, I'm a begginer at mq4 and don't know well about "zero devide error".

I studied about it a little, but no clear explanations about this error and clear causes that happens and how to fix it were found.

Can anyone explain this error clearly? Thanks.

 
latimeria:
As I tested the EA on my GBP/USD or GBP/JPY AlpariUK demo data (15M Open price only) no zefo devide error happens.

I don't have not so long term data as you and can't reproduce your situation.

Do you mean you can't even backtest this EA at all?

Is the same thing happening to others who downloaded this EA?

Again, I'm a begginer at mq4 and don't know well about "zero devide error".

I studied about it a little, but no clear explanations about this error and clear causes that happens and how to fix it were found.

Can anyone explain this error clearly? Thanks.

ya.... I can't even backtest it

 

ups.... it's work..!!!

ups... it's work....

I tried to run your EA in forward mode on GU and GJ just now (demo), and I supprized .... it's work...!!!

I'm using your default setting and now they are floating with profit position

but... I saw that your EA doesn't protect the profit directly, the S/L move slowly closer to the open price....

I'll inform you the progress....

 
//TakeProfit

extern string TakeProfitExp = "<<>>";

extern string TakeProfit_note = "0=No TP, 1=Multiple of SL, 2=Fixed TP Pips 3=Use S&R";

extern int TakeProfit_Method = 0;

extern double TP_Multiple = 1.8;

extern int Fixed_TP = 150;

extern string AboutSRMODE = "--- S&R Mode Setting ---";

extern double SR_Multiple = 0.8;

extern double TPvsSL_Ratio = 0.8;

//Trailing Stop

extern string TrailMethodExp = "<<>>";

extern string Trail_Method_note = "0=Trail_OFF, 1=ATR_Mode, 2=FixPips_Mode, 3=Profit_Mode";

extern int TRAIL_Method = 1;

extern string AboutTrail_Method1 = "--- 1. You can change Trailing ATR Multiple ---";

extern double Trail_ATR = 0.7;

extern string AboutTrail_Method2 = "--- 2. You can change Trailing Pips ---";

extern int Trail_Pips = 200;

extern string AboutTrail_Method3 = "--- 3. You can change Trailing Profit to Reserve ---";

extern double Profit_to_Reserve = 0.2;

hi latimeria...

can you explain your "TAKE PROFIT" and "TRAILING STOP" code above ??

thanks

 

If you mean you want to know how to set up, explanations are follows.

This EA has 4 selectable take profit method.

You can change method by changing "TakeProfit_Method".

Default is "0". It means EA doesn't place Takeprofit at trade opening.

If you change it to "1". EA place Takeprofit at trade opening.

This method determine Takeprofit by multipling initial stoploss.

For example, when initial stoploss is 100pips and "TP_Multiple" is 1.8, Takeprofit is 100*1.8 = 180pips above the entry price (when long).

If you change it to "2". EA place Takeprofit at trade opening.

Takeprofit is simply the value of "Fixed_TP"(pips).

If you change it to "3". EA place Takeprofit at trade opening.

Takeprofit is determined by multiple("SR_Multiple") of the value of custom indicator (Support and Resistance).

This method determine Takeprofit first and determine stoploss by multiple("TPvsSL_Ratio") of Takeprofit.

But it's experimental and I don't recommend to use this method.

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

Regarding trailing stop, almost the same.

This EA has 4 selectable trailing stop method.

You can select method by changing "TRAIL_Method"

Method "0" doesn't trail.

Method "1" determine trailing stop width from multiple("Trail_ATR") of daily ATR. (default)

Method "2" determine trailing stop width using simply fixed pips("Trail_Pips").

Method "3" moves stop to preserve profit (= Bid - current stoploss, *case of long) by the rate ("Profit_to_Reserve").

If Bid - current stoploss is 100pips and rate is 0.2, EA moves up stop 20pips.

But it's experimental and I don't recommend to use this method.

 

thanks for your clearly explanation

here the reports for today..... (note: I don't run my PC 24 hours)

for the second trade for each pair, I changed the S/L method to use fixed pips and I trade using fixed lot (0.1)

The problem is ... I don't see that your EA open at the second candle after the signal trigerred

 

EA doesn't open a trade at the second candle

hi latimeria,

look at the chart picture I attached here, the EA doesn't open a LONG trade at the second candle, why...??

Files:
ea-1.gif  25 kb
 

sorry... maybe this chart is more clear

Files:
ea-1_1.gif  21 kb
ea-2.gif  23 kb
Reason: