Coding help - page 116

 
mladen:
secretcode If it was replaced with end pointed SSA, due the the number of loops where the centered TMA is used and due to the CPU load end pointed SSA would cause, I believe a much stronger PC than we usually have, would be required

Thanks Mladen for reply and explanation

Maybe you are right, SSA itself a bit heavy on CPU usage

But if it could happen, it would be great one

Sometimes T3 gives similar results to SSA endpoint on some timeframe, but it's just an observation !!

Again thanks for help

secretcode

 
secretcode:
Dear Coders

Is it possible to make this indicator (attached) using SSA endpoint so it will became non recalculate indicator! ?

In the picture upper is TMA centered oscillator and lower is Corridoe SSA endpoint !

Visually both looks similar (at least for me )

Thanks for any help,

secretcode

can anyone add buy and sell arrows on the price chart acording to crossovering of green (not lime green) and yellow lines eachothers?

 
anonimm:
can anyone add buy and sell arrows on the price chart acording to crossovering of green (not lime green) and yellow lines eachothers?

anonimm

Centered TMA recalculates (last HalfPeriod bars). Better not to use it in any kind of signaling mode since the signals will be changed as the centered TMA changes values. For more info, please read this thread : https://www.mql5.com/en/forum/174385/page77

 
mladen:
secretcode If it was replaced with end pointed SSA, due the the number of loops where the centered TMA is used and due to the CPU load end pointed SSA would cause, I believe a much stronger PC than we usually have, would be required

Dear Mladen

Can it be done with very limited bars to show option, just in case!

Sorry if too much asking

secretcode

 
secretcode:
Dear Mladen

Can it be done with very limited bars to show option, just in case!

Sorry if too much asking

secretcode

secretcode

Just for the sake of experiment : take the end-pointed SSA and set it to, let say some small number (200 bars for example). And see what happens to your CPU (since in the end point version it must calculate 200x200 bars (200 bars for each end point to be calculated)). Now multiply that with at least 5 (since in the "oscillator" there are 5 loops on centered data). Even with a DLL that is a lot of computation than needs to be done. I say "at least 5" since we need some additional bars in order to stabilize the whole calculation and that would mean that we would in effect not calculate 200 bars but, for example, 400 (it would depend on the lag and the number of computations that SSA would need to calculate for the end-point SSA).

 
mladen:
:)

secretcode

Just for the sake of experiment : take the end-pointed SSA and set it to, let say some small number (200 bars for example). And see what happens to your CPU (since in the end point version it must calculate 200x200 bars (200 bars for each end point to be calculated)). Now multiply that with at least 5 (since in the "oscillator" there are 5 loops on centered data). Even with a DLL that is a lot of computation than needs to be done. I say "at least 5" since we need some additional bars in order to stabilize the whole calculation and that would mean that we would in effect not calculate 200 bars but, for example, 400 (it would depend on the lag and the number of computations that SSA would need to calculate for the end-point SSA).

Unfortunately i do not have super computer to use that super code

Thanks Mladen for your time, efforts and explanation

Really appreciate

secretcode

 

[PHP][/PHP]Good day all, pls I want someone to help me modify the code below and explain.The number one part of the code contains buy and sell alert.It support to give alert when buy and sell signal only occur but it repeat the alert at the beginning of every new candle....pls help to correct this by making the alert sound when the set up condition occur only.

The second part of the code is a stop alert.It is to send stop signal to user when the undergoing buy or sell opportunity is no more.Those code has refuse to work at all, help pls....

static datetime lastAlerted=0;

//Momentum.....1hour

double mom_1h=iMomentum(NULL,60,14,PRICE_CLOSE,0);

double b4mom_1h=iMomentum(NULL,60,14,PRICE_CLOSE,1);

(1)========Alerts for buy and Sell==========

//Alerts for buy

if(mom_1h>99.6353)&&(mom_1h>b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert(Buy","\n","Current time is ",TimeToStr(CurTime()),"\n",Symbol());

}

//Alerts for Sell

if(mom_1h<100.7482)&&(mom_1h<b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert("Sell","\n","Current time is ",TimeToStr(TimeLocal(),TIME_SECONDS),"\n",Symbol());

}

(2)==========Alerts for Stop buying and sell==============

//Alert to stop Buy

if(mom_1h<b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert(Stop Buy","\n","Current time is ",TimeToStr(CurTime()),"\n",Symbol());

}

//Alerts to Stop Selling

if(mom_1h>b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert(" Stop Sell","\n","Current time is ",TimeToStr(TimeLocal(),TIME_SECONDS),"\n",Symbol());

}

 
Mastercash:
Good day all, pls I want someone to help me modify the code below and explain.The number one part of the code contains buy and sell alert.It support to give alert when buy and sell signal only occur but it repeat the alert at the beginning of every new candle....pls help to correct this by making the alert sound when the set up condition occur only.

The second part of the code is a stop alert.It is to send stop signal to user when the undergoing buy or sell opportunity is no more.Those code has refuse to work at all, help pls....

static datetime lastAlerted=0;

//Momentum.....1hour

double mom_1h=iMomentum(NULL,60,14,PRICE_CLOSE,0);

double b4mom_1h=iMomentum(NULL,60,14,PRICE_CLOSE,1);

(1)========Alerts for buy and Sell==========

//Alerts for buy

if(mom_1h>99.6353)&&(mom_1h>b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert(Buy","\n","Current time is ",TimeToStr(CurTime()),"\n",Symbol());

}

//Alerts for Sell

if(mom_1h<100.7482)&&(mom_1h<b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert("Sell","\n","Current time is ",TimeToStr(TimeLocal(),TIME_SECONDS),"\n",Symbol());

}

(2)==========Alerts for Stop buying and sell==============

//Alert to stop Buy

if(mom_1h<b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert(Stop Buy","\n","Current time is ",TimeToStr(CurTime()),"\n",Symbol());

}

//Alerts to Stop Selling

if(mom_1h>b4mom_1h)&&(lastAlerted!=Time[0])){

lastAlerted=Time[0];

Alert(" Stop Sell","\n","Current time is ",TimeToStr(TimeLocal(),TIME_SECONDS),"\n",Symbol());

}

Why don't you store the type of the previous alert then, instead of storing the time of the previous alert? That way, only if the type changes, you will be alerted

 

MT4 external account number check

Hello

I'm looking for a simple and free way to communicate with MT4 using #c.

After i release my EA or indicator to my customers, I want to be able to run an MT4 account number check, and disable functionality if the account number don't match.

The check must be external, since the ex4 can be decompile to mq4 and can be changed.

Can someone help me?

Thanks

 
elimiz:
Hello

I'm looking for a simple and free way to communicate with MT4 using #c.

After i release my EA or indicator to my customers, I want to be able to run an MT4 account number check, and disable functionality if the account number don't match.

The check must be external, since the ex4 can be decompile to mq4 and can be changed.

Can someone help me?

Thanks

elimiz

Since there is no API for metatrader, you can not do that. All the ways that are out there are ex4 sending data to an external module, and since ex4 is decompilable, they can be hacked in matter of minutes