Coding help - page 89

 
Kreangast:
But this code does not write , trouble you into MT4 okay ? Extremely grateful

Kreangast

2013/5/21

You have 2 start routines in that code, for start so it is absolutely not clear what is to be done. Also, from the patched TS code it is not visible what is the purpose and what should the indicator do, so, all I can do is look at that text and say that I can not help you since I have no idea what should that do

 

Hi,

i need you help.

There is the possibility to recall a function when someone change the text of an objecttext?

Thank you

 
dasio:
Hi,

i need you help.

There is the possibility to recall a function when someone change the text of an objecttext?

Thank you

As far as I know no way to do that (you should use ObjectGet() for that and there is no predicted way in that function to retrieve the text of an object).

 

...

Cape Code...

Files:
capecod.jpg  60 kb
 
mladen:
You have 2 start routines in that code, for start so it is absolutely not clear what is to be done. Also, from the patched TS code it is not visible what is the purpose and what should the indicator do, so, all I can do is look at that text and say that I can not help you since I have no idea what should that do

Hi mladen

Please look Codes

_SECTION_BEGIN("pfoot");

TimeFrameSet(inDaily);

TR=Max(Max((High-Low),abs(Ref(Close,-1)-High)),abs(Ref(Close,-1)-Low));

A= H-(TR*0.3);

A1=H-(TR*0.6);

A2=H-(TR*0.8);

A3=H-(TR*1.0);

//

B= L+(TR*0.3);

B1=L+(TR*0.6);

B2=L+(TR*0.8);

B3=L+(TR*1.0);

//

N=100;

H2=HHV(H,N);

L2=LLV(L,N);

PPF=Ref(A,BarsSince(H2));

PPF1=Ref(A1,BarsSince(H2));

PPF2=Ref(A2,BarsSince(H2));

PPF3=Ref(A3,BarsSince(H2));

//

PPFF=Ref(B,BarsSince(L2));

PPFF1=Ref(B1,BarsSince(L2));

PPFF2=Ref(B2,BarsSince(L2));

PPFF3=Ref(B3,BarsSince(L2));

TimeFrameRestore();

// Plot the Support Levels Clouds and Lines //

Plot(TimeFrameExpand(PPF,inDaily ,expandLast), "R1", colorGreen, styleThick);

Plot(TimeFrameExpand(PPF1,inDaily ,expandLast), "R2", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF2,inDaily ,expandLast), "R3", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF3,inDaily ,expandLast), "R4", colorGreen,styleThick);

Plot(TimeFrameExpand(PPFF,inDaily ,expandLast), "S1", colorBlue, styleThick);

Plot(TimeFrameExpand(PPFF1,inDaily ,expandLast), "S2", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF2,inDaily ,expandLast), "S3", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF3,inDaily ,expandLast), "S4", colorBlue,styleThick);

_SECTION_END();

 
Kreangast:
Hi mladen

Please look Codes

_SECTION_BEGIN("pfoot");

TimeFrameSet(inDaily);

TR=Max(Max((High-Low),abs(Ref(Close,-1)-High)),abs(Ref(Close,-1)-Low));

A= H-(TR*0.3);

A1=H-(TR*0.6);

A2=H-(TR*0.8);

A3=H-(TR*1.0);

//

B= L+(TR*0.3);

B1=L+(TR*0.6);

B2=L+(TR*0.8);

B3=L+(TR*1.0);

//

N=100;

H2=HHV(H,N);

L2=LLV(L,N);

PPF=Ref(A,BarsSince(H2));

PPF1=Ref(A1,BarsSince(H2));

PPF2=Ref(A2,BarsSince(H2));

PPF3=Ref(A3,BarsSince(H2));

//

PPFF=Ref(B,BarsSince(L2));

PPFF1=Ref(B1,BarsSince(L2));

PPFF2=Ref(B2,BarsSince(L2));

PPFF3=Ref(B3,BarsSince(L2));

TimeFrameRestore();

// Plot the Support Levels Clouds and Lines //

Plot(TimeFrameExpand(PPF,inDaily ,expandLast), "R1", colorGreen, styleThick);

Plot(TimeFrameExpand(PPF1,inDaily ,expandLast), "R2", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF2,inDaily ,expandLast), "R3", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF3,inDaily ,expandLast), "R4", colorGreen,styleThick);

Plot(TimeFrameExpand(PPFF,inDaily ,expandLast), "S1", colorBlue, styleThick);

Plot(TimeFrameExpand(PPFF1,inDaily ,expandLast), "S2", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF2,inDaily ,expandLast), "S3", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF3,inDaily ,expandLast), "S4", colorBlue,styleThick);

_SECTION_END();

Sorry,

I have no idea what TimeFrameExpand() and TimeFrameRestore() do

 
mladen:
Sorry, I have no idea what TimeFrameExpand() and TimeFrameRestore() do

Hi mladen PPF=Ref(A,BarsSince(H2));

I am grateful for your reply.

TimeFrameExpand(),TimeFrameRestore() is(AmiBroker Multi Timeframe Function)(Multiple time-frame indicators).

Coded:

"PPF=Ref(A,BarsSince(H2));"

BarsSince(H2);Calculates the number of bars (time periods) that have passed since ARRAY was true (or 1);AmiBroker Formula Language Function Reference

Please have replaced BarsSince() to BARSLAST()

BARSLAST(H2);Find the last condition holds to the current number of cycles.

I need BARSLAST(H2) to express this function MT4

See link Thank You

Kreangast

2013-5-23

 
Kreangast:
Hi mladen PPF=Ref(A,BarsSince(H2));

I am grateful for your reply.

TimeFrameExpand(),TimeFrameRestore() is(AmiBroker Multi Timeframe Function)(Multiple time-frame indicators).

Coded:

"PPF=Ref(A,BarsSince(H2));"

BarsSince(H2);Calculates the number of bars (time periods) that have passed since ARRAY was true (or 1);AmiBroker Formula Language Function Reference

Please have replaced BarsSince() to BARSLAST()

BARSLAST(H2);Find the last condition holds to the current number of cycles.

I need BARSLAST(H2) to express this function MT4

See link Thank You

Kreangast

2013-5-23

Did you check among metatrader multi time frame indicators.

In my experience 99% of amibroker indicators already exist for metatrader 4 too

 

Hi mladen

Once again, thank you for your reply!

I was going to change the code into MT4 multi-cycle indicator.(1m,5m,15m,30m,1h...)

Could you write into MT4 indicators.

Kreangast

2013-5-23

 

Hi mladen

barssince(x): count the period number since the first x != 0;

barslast(x): count the period number since the last x != 0.

Formula Quick Reference - www.TecStock.com

Thank you

Kreangast

2013-5-23

Reason: