Elite indicators :) - page 270

rosalieone
193
rosalieone  

How to add a stop loss

Hello,

I'm using the following EA with great result (i know its a martingale but if you stop early you win) but it hasn't any stop loss possibility.

Could someone add one ?

Thanks

Files:
traderduke
531
traderduke  

mladen

thanks for the prog fix. I have 40 questions but here are a few of them;

1. integer value - does" int timeFrame = PERIOD_H4" produce that result??

2. can i make it an input?? Does icustom need a change to control the timeframe??

3. the picture show no change to the results apparently the "int timeFrame = PERIOD_H4" are hard fast inputs and there is no control from the TimeFrame input.

top chart is h1 with h4 rsi input

middle is STR run with h1 chart

bottom is Str run with h4 chart , both have the hard coded "int timeFrame = PERIOD_H4" in place as shown in MET editor picture.

Yes my goal was to run a h1 chart with the h4 timeframe and enter trades at the reversal.

any sugestions.

Thanks

Ray

mladen:
Ray

Do it this way (posting just the buy signal you are using as an example here, all the rest of the call to indicator should be done in same manner) :

bool BuySignal()

{

int timeFrame = PERIOD_H4; // or any time frame you choose, but it must be integer value

double Trendc = iCustom(Symbol(),timeFrame,"RK-ml-RSI_EMA_MTF v1.2","",RsiPeriod, MaType, MaPeriod,2,Shift+0);

if (Trendc > 0 && TimeCondition()) return(true); return(false);

}

[/php]but that way is not telling you that the trend have changed. In order to enter on trend change (I assume that it is what you want to do, otherwise every bar with up trend in this example, will show a buy signal), you need to have something like this

[php]bool BuySignal()

{

int timeFrame = PERIOD_H4; // or any time frame you choose, but it must be integer value

double Trendc = iCustom(Symbol(),timeFrame,"RK-ml-RSI_EMA_MTF v1.2","",RsiPeriod, MaType, MaPeriod,2,Shift+0);

double Trendp = iCustom(Symbol(),timeFrame,"RK-ml-RSI_EMA_MTF v1.2","",RsiPeriod, MaType, MaPeriod,2,Shift+1);

if (Trendc!=Trendp && Trendc > 0 && TimeCondition()) return(true); return(false);

}

regards

Mladen
Mladen Rakic
151198
Mladen Rakic  

Ray

From my tests it seems to be OK

You are testing closed bars, which means the following :
- indicator is showing an arrow on the beginning of the target time frame period (0,4,8... for 4 hour target time frame)

- you are testing closed bar and a previous closed bar which means that entry will happen with 4 hour delay compared to the place where the arrow is shown on 1 hour chart (as far as I see that is what is shown on your charts too, so it is a completely normal way of entering positions when testing closed bars)

- here is a comparison of a 1 hour time frame chart with a 4 hour time frame indicator and the back test of the EA run on 1 hour chart with 4 hour time frame indicator
Also, as a reminder, I told in the cases when arrows are drawn on multi time frame charts that arrows are drawn on the first bar belonging to the target time frame but that does not mean that they happened then : they could happen on any bar belonging to target time frame

As of time frame : in mtf indicators I use strings fro inputs simply because it is much easier to type in D1 for example than to have to know that day has 1440 minutes and that you heave to type in 1440. Internally, metatrader does not have a slightest idea what id "D1" - it only recognizes 1440 in the place where time frame should be placed as day - "D1" or "Day" or "TimeFrame" or anything similar just means wrong time frame to it and then it switches to current time frame

PS: attaching the EA I tested (TimeFrame is a parameter and integer in this case - in the the exit testings I did not uses both bar testing - I did not go through your whole code, but was interested if the entries are going to be correct and as you can see they are) And also as a reminder, if you try to use current bar testing with multi time frame indicators you are going to get completely false results (it has been a subject of a lot of posts why mtf back tests should be done on closed bars) so this test is only reliable way of testing - testing the EA on closed bars

Mladen Rakic
151198
Mladen Rakic  

Rodney

It is not the same. There are changes in the way how some loops are solved (I actually threw out 2 double loops and solved the work done within those differently) but as far as the values are concerned, they are the same (as they should, regardless of the coding difference)

The size difference is a result of platform change (I got back to Visual studio - frankly got sick of faulty documentation, and if microsoft can do something as it should be then it is the documentation, their help files almost newer have faults) and avoiding external dll's (so different linking type mostly) whenever it is possible (for reasons I stated - in some cases "msvcrt.dll" is simply "unfindable" and then people are having problems running those indicators - this one does not have that problem)

So, the new libSSA is a kind of an evolution not a revolution (this is a classical case when someone revisit code and then comes to a conclusion that something could be done differently and a bit faster)

Hope this clarifies what have been done and why

regards

Mladen

madcedar:
Hello Mladen,

You mentioned the source code for your libSSA.dll on this post. The only source code that I found posted within this thread is on this post here posted way back in 2009. I just wondering if it's the same as the current libSSA.dll as the size of the currrent dll is much larger than the one from 2009.

Kind Regards

Rodney

PS: I am not requesting that you post your current source code, I'm only curious if it has changed.
traderduke
531
traderduke  

Mladen,

Thanks for the MTF explaination, it appears mtf won't work well on an EA. So I guess i'm back to my straight time indicators. This KC which you added alerts to months ago would be more visiable with arrrows, is there any chance you could add arrows when the alert fires.

thanks again

Ray

Mladen Rakic
151198
Mladen Rakic  

Some additions :

Simba posted Fourier extrapolations that he used as a frame for extrapolations. Here is a couple of ones that are using a dll library (some more changes in it made, so in these the dll that is attached must be used) Attaching 2 example indicators that can easily be used to addapt to extrapolate anything : one is on the main chart (the "of price" one) and the other is in a sub-window (the "of WPR")

In both the only line that needs to be changed is the line 93 (it is made to be at the same line in both indicators) Just replace it with what one needs to be extrapolated add parameters at the beginning and use it. The main difference in these is the speed (as I told already that is the main reason for making dll) and some problems that could happen are solved

__________________________

Here are some examples (and i would like to remind that the red parts are prediction from the past values (the calculation itself has "no idea at all" of the future values under the red part of the indicator - the values are calculated exclusively from the data contained in the "dotted part" and as you can check only those values are passed to extrapolation function) - it is not going to be this effective all the time and sometimes it is going to show you completely opposite results, but next time when some smart a... tells you that everything is random at 50% possibility for either way, just show him a simple extrapolation. There are no holly grails in TA (and this one is far, far from it) but things like these are showing the whole meaning and goals of TA itself)
PS: from my experiments every time frame should adjust the number of past bars and harmonics number for longer predictions. So far did not find an easy way to "automatize" finding those parameters, but from tests, without changing those, using moderate number for last bar (50 for example) and future bars (100 if you are eager to see the future itself too ) is not an unreasonable choice (something like this :
SIMBA
2078
SIMBA  
mladen:
Some additions :

Simba posted Fourier extrapolations that he used as a frame for extrapolations. Here is a couple of ones that are using a dll library (some more changes in it made, so in these the dll that is attached must be used) Attaching 2 example indicators that can easily be used to addapt to extrapolate anything : one is on the main chart (the "of price" one) and the other is in a sub-window (the "of WPR")

In both the only line that needs to be changed is the line 93 (it is made to be at the same line in both indicators) Just replace it with what one needs to be extrapolated add parameters at the beginning and use it. The main difference in these is the speed (as I told already that is the main reason for making dll) and some problems that could happen are solved

__________________________

Here are some examples (and i would like to remind that the red parts are prediction from the past values (the calculation itself has "no idea at all" of the future values under the red part of the indicator - the values are calculated exclusively from the data contained in the "dotted part" and as you can check only those values are passed to extrapolation function) - it is not going to be this effective all the time and sometimes it is going to show you completely opposite results, but next time when some smart a... tells you that everything is random at 50% possibility for either way, just show him a simple extrapolation. There are no holly grails in TA (and this one is far, far from it) but things like these are showing the whole meaning and goals of TA itself)
PS: from my experiments every time frame should adjust the number of past bars and harmonics number for longer predictions. So far did not find an easy way to "automatize" finding those parameters, but from tests, without changing those, using moderate number for last bar (50 for example) and future bars (100 if you are eager to see the future itself too ) is not an unreasonable choice (something like this :

Mladen,

Thanks for these indicators and DLL.

Yes,it is far away from being the HG but it helps a lot,specially,as it happens now with your new dll,if we can use long history and high harmonics without overloading the cpu the prediction capabilities will increase.Using it to see the future is interesting,even if,depending on the base indicator,sometimes the results are astonishing,using it to have a +- 2 bars idea about a potential zero crossing or change of slope,is worth studying..

You keep rocking,I see

S

SIMBA
2078
SIMBA  
Flytox
256
Flytox  
mrtools:
Sorry for late reply was testing the alerts and they seem to be working, please just remember the recalculating nature of SSA.

Hi mrtools ,

i like this thing very much. I tried to modify the way the alert information is displayed but not able to. I'd like it to specify the symbol and the tf concerning the alert.

Ps: i'a m talking about your TTM_Ssa bars alert indi.

Thx a lot

William Snyder
9496
William Snyder  

fe avgs

This one is fourier extrapolation of averages.