Hello!
good afternoon.
i want to modify attached source to suit what i want style.
this is trend line alert and if price line cross then alert fire but it every bar alert fire so
i want to try to make it only one times for alert but no luck.
Hello!
good afternoon.
i want to modify attached source to suit what i want style.
this is trend line alert and if price line cross then alert fire but it every bar alert fire so
i want to try to make it only one times for alert but no luck.
i was used
static datetime Time0;
if(Time0 == Time[0] ) return;
but it continue alert per bar.
any help much appreciate
You should use a simple bool for this. Your using time all wrong. See file, should only give one alert now, but i havnt tested.
thanks RaptorUK and marty087!
i was test marty087 your modified indicator but it only alert one times when price line go above trend line but
when price line go below trend line it never alert.
i was attached orginal source file . before i was try to modify from attached source file.
but actually some function couldn't understand i was try to debug using Print function but it very confuse.
in function valc = ObjectGetValueByShift exist..and when debug this value.
i was found valc is start of candle wicks value ? but what is valp value? i can't figure out.. double valp = ObjectGetValueByShift(LineName,testbar+1);
i think valp value is not Close[1] or Close[0] value..
what i actually want is .. when price line go above trend line alert one times and if price line( Close[1]) go below alert one times
thanks you!
what i actually want is .. when price line go above trend line alert one times and if price line( Close[1]) go below alert one times
did you read what i wrote just before ?
i was wrote such like "i was found valc is start of candle wicks value ? but what is valp value? i can't figure out.. double valp = ObjectGetValueByShift(LineName,testbar+1);"
and in this thread https://forum.mql4.com/57289, you mention i have to read ObjectGetValueByShift this function..
ok what i want to say is ..i was read what you said related with ObjectGetValueByShift and i was try to modify source code with this function but still not working
did you read what i wrote just before ?
i was wrote such like "i was found valc is start of candle wicks value ? but what is valp value? i can't figure out.. double valp = ObjectGetValueByShift(LineName,testbar+1);"
and in this thread https://forum.mql4.com/57289, you mention i have to read ObjectGetValueByShift this function..
ok what i want to say is ..i was read what you said related with ObjectGetValueByShift and i was try to modify source code with this function but still not working
Write your test code and if you are having problems with it ask again . . . if all you want is someone to write your code for you then the solution is very, very simple: write my mql4 code for me
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello!
good afternoon.
i want to modify attached source to suit what i want style.
this is trend line alert and if price line cross then alert fire but it every bar alert fire so
i want to try to make it only one times for alert but no luck.
i was used
static datetime Time0;
if(Time0 == Time[0] ) return;
but it continue alert per bar.
any help much appreciate