Coding help - page 334

 
mladen:
faremie Seems that the indicator you are talking about is not attached. Would you mind attaching it?

I guess it is one post above

 
thefxpros:
I guess it is one post above

Yep, you are right

 

Hello can someone show me how to call any of the fibonacci level (say level 23) from an MT4 code and know when the current price cross the level upward or downward without error? I dont want to show my code so as not to confuse anyone, I haven't gotten it at all!

 

Hi,mladen.

i am sorry if you couldnt get the attached file..i think on my first post i already attached it.

Did you get it sir?

Can you help me with it please.

As you already notice,my computing skill is not that good...Hhahah....Sorry.

In the indicator settings,i will change the min range to 3 so that it can read the size of the candlestick on my chart.

spikebars_v3_1.mq4

Files:
 

Make the indicator «TSI», having some difficulties.

When you call the indicator "TSI_Metod" with smoothing method "EMA," getting the right values ​​and the output indicator after the test.

It is necessary to change the method of smoothing the indicator disappearsand displays the wrong number.

Tried to make payment buffers several others in the display"TSI_Test". Get the wrong tsyfry but the indicator appears after the test.

It is not clear why the indicator "TSI_Test" is displayed after the test, with the correct values​​, but does not pass them right in the trading program.

Diff indicators "TSI_Metod" and "TSI_Test" in the method of calculating the buffers:

TSI_Metod:

limit1=Bars-counted_bars-1;

for(i=limit1;i>=0;i--)ExtMapBuffer2=Close-Close;

for(i=limit1;i>=0;i--)ExtMapBuffer3=MathAbs(Close-Close);

for(i=limit1;i>=0;i--)ExtMapBuffer4=iMAOnArray(ExtMapBuffer2,0,r2,0, Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer5=iMAOnArray(ExtMapBuffer3,0,r2,0, Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer6=iMAOnArray(ExtMapBuffer4,0,r3,0, Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer7=iMAOnArray(ExtMapBuffer5,0,r3,0, Method,i);

for(i=limit1;i>=0;i--) ExtMapBuffer8=iMAOnArray(ExtMapBuffer6,0,r4,0,Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer9=iMAOnArray(ExtMapBuffer7,0,r4,0, Method,i);

for(i=limit1;i>=0;i--){ExtMapBuffer1=100*ExtMapBuffer8/ExtMapBuffer9;}

[/CODE]

TSI_Test:

[CODE]limit1=Bars-counted_bars-1;

limit2=limit1;

limit3=limit2;

limit4=limit3;

if(limit1>0)

{

limit1=limit1-Period_MA_1-1;

limit2=limit1-p2;

limit3=limit2-p3;

limit4=limit3-p4;

}

for(i=limit1;i>=0;i--) ExtMapBuffer2=Close-Close;

for(i=limit1;i>=0;i--)ExtMapBuffer3=MathAbs(Close-Close);

for(i=limit2;i>=0;i--)ExtMapBuffer4=iMAOnArray(ExtMapBuffer2,0,p2,0, MA_Method,i);

for(i=limit2;i>=0;i--) ExtMapBuffer5=iMAOnArray(ExtMapBuffer3,0,p2,0,MA_Method,i);

for(i=limit3;i>=0;i--)ExtMapBuffer6=iMAOnArray(ExtMapBuffer4,0,p3,0, MA_Method,i);

for(i=limit3;i>=0;i--)ExtMapBuffer7=iMAOnArray(ExtMapBuffer5,0,p3,0, MA_Method,i);

for(i=limit4;i>=0;i--) ExtMapBuffer8=iMAOnArray(ExtMapBuffer6,0,p4,0,MA_Method,i);

for(i=limit4;i>=0;i--)ExtMapBuffer9=iMAOnArray(ExtMapBuffer7,0,p4,0, MA_Method,i);

for(i=limit4;i>=0;i--)

{

ExtMapBuffer1=0;ExtMapBuffer1=100*ExtMapBuffer8/ExtMapBuffer9;

}
Files:
 
QuantF:
Make the indicator «TSI», having some difficulties.

When you call the indicator "TSI_Metod" with smoothing method "EMA," getting the right values ​​and the output indicator after the test.

It is necessary to change the method of smoothing the indicator disappearsand displays the wrong number.

Tried to make payment buffers several others in the display"TSI_Test". Get the wrong tsyfry but the indicator appears after the test.

It is not clear why the indicator "TSI_Test" is displayed after the test, with the correct values​​, but does not pass them right in the trading program.

Diff indicators "TSI_Metod" and "TSI_Test" in the method of calculating the buffers:

TSI_Metod:

limit1=Bars-counted_bars-1;

for(i=limit1;i>=0;i--)ExtMapBuffer2=Close-Close;

for(i=limit1;i>=0;i--)ExtMapBuffer3=MathAbs(Close-Close);

for(i=limit1;i>=0;i--)ExtMapBuffer4=iMAOnArray(ExtMapBuffer2,0,r2,0, Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer5=iMAOnArray(ExtMapBuffer3,0,r2,0, Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer6=iMAOnArray(ExtMapBuffer4,0,r3,0, Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer7=iMAOnArray(ExtMapBuffer5,0,r3,0, Method,i);

for(i=limit1;i>=0;i--) ExtMapBuffer8=iMAOnArray(ExtMapBuffer6,0,r4,0,Method,i);

for(i=limit1;i>=0;i--)ExtMapBuffer9=iMAOnArray(ExtMapBuffer7,0,r4,0, Method,i);

for(i=limit1;i>=0;i--){ExtMapBuffer1=100*ExtMapBuffer8/ExtMapBuffer9;}

[/CODE]

TSI_Test:

[CODE]limit1=Bars-counted_bars-1;

limit2=limit1;

limit3=limit2;

limit4=limit3;

if(limit1>0)

{

limit1=limit1-Period_MA_1-1;

limit2=limit1-p2;

limit3=limit2-p3;

limit4=limit3-p4;

}

for(i=limit1;i>=0;i--) ExtMapBuffer2=Close-Close;

for(i=limit1;i>=0;i--)ExtMapBuffer3=MathAbs(Close-Close);

for(i=limit2;i>=0;i--)ExtMapBuffer4=iMAOnArray(ExtMapBuffer2,0,p2,0, MA_Method,i);

for(i=limit2;i>=0;i--) ExtMapBuffer5=iMAOnArray(ExtMapBuffer3,0,p2,0,MA_Method,i);

for(i=limit3;i>=0;i--)ExtMapBuffer6=iMAOnArray(ExtMapBuffer4,0,p3,0, MA_Method,i);

for(i=limit3;i>=0;i--)ExtMapBuffer7=iMAOnArray(ExtMapBuffer5,0,p3,0, MA_Method,i);

for(i=limit4;i>=0;i--) ExtMapBuffer8=iMAOnArray(ExtMapBuffer6,0,p4,0,MA_Method,i);

for(i=limit4;i>=0;i--)ExtMapBuffer9=iMAOnArray(ExtMapBuffer7,0,p4,0, MA_Method,i);

for(i=limit4;i>=0;i--)

{

ExtMapBuffer1=0;ExtMapBuffer1=100*ExtMapBuffer8/ExtMapBuffer9;

}

Try them out now : tsi_metod_1.mq4 and tsi_test_1.mq4

Files:
tsi.gif  64 kb
 

I have tried a few times, but my coding skills are too limited to get it done:

1. I wanted to do a version of one of this Fisher indicators (one is enough, they have very similar results) that paints the chartbackground green when Fisher is above zero, and red when below (just like the attached MACD).

2. I wanted to create offlinecharts where I can set a time for start and end (need it to show me only the trading hours of a 24 hour s&p chart. no period conversion needed, just thought this indicator is closest to what I wanted).

I hope someone can be so kind to take a look at it.

Thanks

 
marley60:
I have tried a few times, but my coding skills are too limited to get it done:

1. I wanted to do a version of one of this Fisher indicators (one is enough, they have very similar results) that paints the chartbackground green when Fisher is above zero, and red when below (just like the attached MACD).

2. I wanted to create offlinecharts where I can set a time for start and end (need it to show me only the trading hours of a 24 hour s&p chart. no period conversion needed, just thought this indicator is closest to what I wanted).

I hope someone can be so kind to take a look at it.

Thanks

wow .. neded too much time for me

 
mladen:
Try them out now : tsi_metod_1.mq4 and tsi_test_1.mq4

Excellent! Thank you earned.

 

Hello can someone show me how to call any of the fibonacci level (say level 23) from an MT4 code and know when the current price cross the level upward or downward without error?

Reason: