Requests & Ideas - page 24

 

Thank you very much Mladen.

 

Hi all,

I need an help with this 2 indicator; they suppose to generate tick chart on MT4

You have to put the "LogTickData" indicator in a 1M chart, then on the same window attach the "PostTickData" with parameter the number of ticks that you want.

After that you should have your tick chart in the offline menu.

My problem is that the tick chart didn't update itself, I've to refresh the chart if I want read the last data (under alpari MT4) or (under forex.com MT4) when I try to open the tick chart I got only "waiting for update" and that's it.

Any help about that?

Thanks in advance for your reply

Best Regards

Brax64

Files:
 
mladen:
Zipfrog

Here you go

Alert are triggered when a high penetrates +8 or when a low penetrates -8 level.

regards

Mladen

Mladen

Addition to this can you add arrows when the high penetrates +8 or when the low penetrates -8 level.Thanks

 

Brax64

Try this out

I tested it but not extensively (made it today so did not have time enough to test it extensively) The ones you posted are too heavy on CPU and way to complicated for my taste so decided to make a completely new (as simple as possible one) indicator. At a first glance it works OK, but please, if you notice any problems, let me know

_______________________________

Way to use :
Actually almost nothing to tell here. There are no parameters and there are no required time frames that you have to attach it to. It is an indicator (so place it in indicators folder) and it will work the same regardless of the time frame it is attached to. You can change time frames at the chart it is attached to freely (it will not stop, all you risk is loosing a tick or two and adding one extra tick at a same price as the last tick) as long as you do not change the symbol

It will create a file that is starting with "_t" and adds symbol name after it. It "pretends" to be 1 minute chart, but it is not (of course ) Just open that symbol as offline chart and use it (the indicator must be active on some other chart in order to get "live" ticks) Also, set the display type to line chart since otherwise you are going to get only dots on screen (all the prices are the same, so bars or candles are meaningless in this mode)

Tried to use indicators on it and every one that does not have hard coded symbol name or time frame works OK (here is an example of such a chart - just threw some of the indicators from my list in indicators list)
_______________________________ Known issues :
None that I know of at a moment
_______________________________ A will do:
The way it works now you do not see that it works when you place it at a chart. Will do some fast (so that eventual ticks do not suffer) way that will "tell" that it is working
_______________________________

PS: forgot to tell - it has to have (the indicator) "Allow DLL imports" in options in order to work

PPS: due to metatrader limitation that handle to a first occurrence of a window with a specific symbol used is returned if you have more than 1 offline chart with a same symbol opened only the first window will be updated automatically (live) In the rest you will have to switch between charts (metatrader refreshes the chart automatically when it receives focus) But as I say, it is only when you have more than 1 offline chart with the same symbol tick data loaded

_______________________________

regards

Mladen

brax64:
Hi all,

I need an help with this 2 indicator; they suppose to generate tick chart on MT4

You have to put the "LogTickData" indicator in a 1M chart, then on the same window attach the "PostTickData" with parameter the number of ticks that you want.

After that you should have your tick chart in the offline menu.

My problem is that the tick chart didn't update itself, I've to refresh the chart if I want read the last data (under alpari MT4) or (under forex.com MT4) when I try to open the tick chart I got only "waiting for update" and that's it.

Any help about that?

Thanks in advance for your reply

Best Regards

Brax64
Files:
 

This should cover all the issues with saving I could think of till now regarding tick data

_______________________

Two options added :
ResetData-
Added it in order to be able to "start from the beginning" (if you turned off your PC and a "time gap" occurs since there is no way to reconstruct tick data or any other reason when you do not want the data to be appended to already existing tick data) If you set this parameter to true, it will start a new tick data history.

Be careful with this option since it will do the same thing whenever you change time frames or restart metatrader too, so usually it should be used just once : set it to true, wait for 1 tick to have the file reset and then set it to false and off you go

ShowComment-
It is the fastest way to show that it is working, so if you set it to true it will simply comment in the upper left corner that tick data is saved and a time when it was saved. That way it will not be engaged in complicated object(s) creation - updates and will not miss any ticks
Some minor code changes done too but they affect only the eventual speed of execution (a tiny bit faster now)

_______________________

Note : the nature of ticks is that a tick can not be identified by the time it happened (it is a random time). Hence, you can not have more than one indicator for the same symbol active : it will end up writing same ticks as many times as much instances of the indicator are loaded. So keep just one instance of the indicator per symbol active

PS: changed the tick price from Close to Bid. It solves a problem of very different prices that sometimes happen when time frames are changed

 

This is contagious

_________________________

Some more additions and changes :
Added an option to choose how many ticks do you want per bar. Indicator is differentiating 2 basic types. When required number of ticks per bar is 1, it records bid as low and ask as high, so you can have a sort of a "spread control" (since now you can see those ticks as lines but you can see them as bars too, as in this example )

When required number of ticks is greater than 1 then you are getting a sort of "equi-volume" charts (every bar is having a same volume when you turn the volume display on) High, low, open and close are constructed from a Bid. As an example here is a 10 ticks chart of EURUSD

Decided to change the name and add version to the indicator since it seems that this is a never ending story type of indicator (always something can be added and always something to be solved differently) Now stopping to post new versions of this one today or I risk to get killed by ND for spamming

Wish a great weekend to all

 
I was curious what would happen if I use the "Tick data" indicator in a visual back test mode. Well, refreshing the target window does not work (in a back test mode, of course) but with some code adapting (the additional TestModeparameter is used for that purpose - by all means use it in back test mode since it will not work otherwise) I was able to produce an offline chart of ticks simulated by metatrader (the "Every tick (the most precise....)" stuff. And this is what I got :
Test was with a 10 ticks per bar (visible from the volume) but the result is (or maybe better to tell, isn't) surprising : for a 10 tick bars the changes are poor and real data flow simulation is far, far from anything real. If you are testing an EA that depends on a narrow take profits or stops, this example shows you that back test can not be trusted at all

_______________________

PS: the attached indicator is, apart from having the possibility of recording test data, a revised version with some code optimization and some corrections (there was one error that needed attention )

Files:
 

Hi Mladen

Could you program the two Marney indicators, Fx Trader Magazine spoke in the month of July-September.

Here are the codes I think Ninja Trader

Marney Volume Indicators:

{***********************************************}

{Marney Indicator(TM) - Marney Volume Indicator(TM)

Copyright Caspar Marney, Marney Capital 2010(C)}

{***********************************************}

input: avgLen(10), mins.in.session(1440), autobars(True), upcolor(cyan), dncolor(red);

var: start(0), end1(0), end2(0), x(0), p(-1), count(0), avg(0), barsinday(0), DayNumber(0);

array: xv[199,1440](0);

if bartype < 2 then begin

start= (Sessionstarttime(1,1));

end1= (sessionendtime(1,1));

end2= (sessionendtime(1,2));

value1 = timetominutes(start);

value2 = timetominutes(end2);

if start > end2 then

value3 = 1440+(value2-value1);

if start < end2 then

value3 = -(value1-value2);

if autobars = false then value3 = mins.in.session;

barsinday = ceiling(value3/barinterval);

if dd[1] then begin

if count=barsInDay then begin

p=iff(p<avgLen-1,p+1,0);

for x=1 to barsInDay begin

xv[p,x]=ticks;

end;

end;

count=1;

end else count=count+1;

if xv[avgLen-1,count]>0 then begin

avg=0;

for x=0 to avgLen-1 begin

avg=avg+xv[x,count];

end;

avg=avg/avgLen;

plot2(ticks,"ticks",default,1);

plot1(avg,"avg",yellow,default,1);

end;

if close > open then setplotcolor(2,upcolor);

if close < open then setplotcolor(2,dncolor);

end;

if bartype > 1 then begin

avg = averagefc(v,avglen);

plot2(v,"ticks",default,1);

plot1(avg,"avg",yellow,default,1);

if close > open then setplotcolor(2,upcolor);

if close < open then setplotcolor(2,dncolor);

end;

{***********************************************}

{Marney Indicator(TM) - Marney Volume Indicator(TM)

Copyright Caspar Marney, Marney Capital 2010(C)}

{***********************************************}

Marney Range Indicator:

{***********************************************}

{Marney Indicator(TM) - Marney Range Indicator(TM)

Copyright Caspar Marney, Marney Capital 2010(C)}

{***********************************************}

input: avgLen(10), mins.in.session(1440), autobars(True), upcolor(cyan), dncolor(red);

var: start(0), end1(0), end2(0), x(0), p(-1), count(0), avg(0), barsinday(0);

array: xr[50,1440](0);

if bartype < 2 then begin

start= (Sessionstarttime(1,1));

end1= (sessionendtime(1,1));

end2= (sessionendtime(1,2));

value1 = timetominutes(start);

value2 = timetominutes(end2);

if start > end2 then

value3 = 1440+(value2-value1);

if start < end2 then

value3 = -(value1-value2);

if autobars = false then value3 = mins.in.session;

barsinday = ceiling(value3/barinterval);

if dd[1] then begin

if count=barsInDay then begin

p=iff(p<avgLen-1,p+1,0);

for x=1 to barsInDay begin

xr[p,x]=truerange;

end;

end;

count=1;

end else count=count+1;

if xr[avgLen-1,count]>0 then begin

avg=0;

for x=0 to avgLen-1 begin

avg=avg+xr[x,count];

end;

avg=avg/avgLen;

plot2(truerange,"range",default,1);

plot1(avg,"avg",yellow, default,1);

end;

if close > open then setplotcolor(2,upcolor);

if close < open then setplotcolor(2,dncolor);

end;

if bartype > 1 then begin

avg = averagefc(truerange,avglen);

plot2(truerange,"range",default,1);

plot1(avg,"avg",yellow, default,1);

if close > open then setplotcolor(2,upcolor);

if close < open then setplotcolor(2,dncolor);

end;

{***********************************************}

{Marney Indicator(TM) - Marney Range Indicator(TM)

Copyright Caspar Marney, Marney Capital 2010(C)}

{***********************************************}

Here is a description of these indicators ( page 28-31 )

Best regards and good Week-end

Gafet

Files:
 
mladen:
I was curious what would happen if I use the "Tick data" indicator in a visual back test mode. Well, refreshing the target window does not work (in a back test mode, of course) but with some code adapting (the additional TestModeparameter is used for that purpose - by all means use it in back test mode since it will not work otherwise) I was able to produce an offline chart of ticks simulated by metatrader (the "Every tick (the most precise....)" stuff. And this is what I got :
Test was with a 10 ticks per bar (visible from the volume) but the result is (or maybe better to tell, isn't) surprising : for a 10 tick bars the changes are poor and real data flow simulation is far, far from anything real. If you are testing an EA that depends on a narrow take profits or stops, this example shows you that back test can not be trusted at all

_______________________

PS: the attached indicator is, apart from having the possibility of recording test data, a revised version with some code optimization and some corrections (there was one error that needed attention )

Hi Mladen,

It's difficult to find a way to say "thank you!!!". Your job here is priceless I'm glad to see that there are still persons around dedicated to help others.

A word of gratitude to you Mladen, thanks a lot!

Best regards and enjoy the weekend!!

Brax 64

 

And the Marney range indicator

Same general comments as for the Marney volume indicator except it seems that this one works better with longer average period so I decided to use default one suggested by Caspar Marney in his article - 50.

And the comparison of the 2 )range is average period 50 volumes are average period 10)
regards

Mladen