Page 147 of 158

Re: Coding Help

Posted: Sun Apr 02, 2023 8:41 pm
by FoxFoxicle
andrei-1 wrote: Sun Apr 02, 2023 8:10 pm It is possible to count the borders separately. There is logic in this. Stocks rise and fall in different ways.
Thank you my friend, you are the best!

Re: Coding Help

Posted: Fri Apr 07, 2023 10:59 pm
by Forexlearner
is there a alternative to the Meta Editor with dark mode? i was using Visual Studio but i miss the different text colours that make it easier to visualise the code.

Re: Coding Help

Posted: Fri Apr 07, 2023 11:14 pm
by andrei-1
Forexlearner wrote: Fri Apr 07, 2023 10:59 pm is there a alternative to the Meta Editor with dark mode?
The compilation algorithm is the secret of Metaquotes. :eh:

Re: Coding Help

Posted: Fri Apr 07, 2023 11:42 pm
by Forexlearner
andrei-1 wrote: Fri Apr 07, 2023 11:14 pm The compilation algorithm is the secret of Metaquotes. :eh:
ok thx

Re: Coding Help

Posted: Fri Apr 14, 2023 1:36 pm
by pin12
Hi!

Could someone completely disable all alerts in this source code please?

This is a very interesting robot but it has the flaw that it only wins in the direction of the trend. Against the trend, it loses. That is why you have to manually modify the buys and sells according to the trend.

If this robot can even be improved so that it detects trends automatically, it would be much better.

If possible, thank you..

Re: Coding Help

Posted: Fri Apr 14, 2023 4:46 pm
by andrei-1
pin12 wrote: Fri Apr 14, 2023 1:36 pm disable all alerts
Try.
Alerts = false

Re: Coding Help

Posted: Fri Apr 14, 2023 11:39 pm
by pin12
andrei-1 wrote: Fri Apr 14, 2023 4:46 pm Try.
Alerts = false
Excellent.. thanks :)

Re: Coding Help

Posted: Wed Apr 19, 2023 3:25 am
by kkfx
Can anybody suggest the correct way to get long and short trends from step NEMA indicator?

Code: Select all

bool trendLong,trendShort;

Signal1 =iCustom(NULL, 0, "step nema (mtf + alerts + arrows)",PERIOD_CURRENT,NEMAperiod, 2, 0.5, 50.0,0,false,0.0,0.0,0,3,1,false, false, false, false,false,false,159,159,2,2,0.5,0.5,true,true, 2, 0);
Signal2 =iCustom(NULL, 0, "step nema (mtf + alerts + arrows)",PERIOD_CURRENT,NEMAperiod, 2, 0.5, 50.0,0,false,0.0,0.0,0,3,1,false, false, false, false,false,false,159,159,2,2,0.5,0.5,true,true, 3, 0);

      
      if(Signal1>0 && Signal1!=EMPTY_VALUE && Signal2!=0 && Signal2!=EMPTY_VALUE)trendLong=true;
      if(Signal1>0 && Signal1!=EMPTY_VALUE && Signal2>0 && Signal2!=EMPTY_VALUE)trendShort=true;


I am using this version of indicator

Re: Coding Help

Posted: Wed Apr 19, 2023 4:14 am
by mrtools
kkfx wrote: Wed Apr 19, 2023 3:25 am Can anybody suggest the correct way to get long and short trends from step NEMA indicator?

Code: Select all

bool trendLong,trendShort;

Signal1 =iCustom(NULL, 0, "step nema (mtf + alerts + arrows)",PERIOD_CURRENT,NEMAperiod, 2, 0.5, 50.0,0,false,0.0,0.0,0,3,1,false, false, false, false,false,false,159,159,2,2,0.5,0.5,true,true, 2, 0);
Signal2 =iCustom(NULL, 0, "step nema (mtf + alerts + arrows)",PERIOD_CURRENT,NEMAperiod, 2, 0.5, 50.0,0,false,0.0,0.0,0,3,1,false, false, false, false,false,false,159,159,2,2,0.5,0.5,true,true, 3, 0);

      
      if(Signal1>0 && Signal1!=EMPTY_VALUE && Signal2!=0 && Signal2!=EMPTY_VALUE)trendLong=true;
      if(Signal1>0 && Signal1!=EMPTY_VALUE && Signal2>0 && Signal2!=EMPTY_VALUE)trendShort=true;


I am using this version of indicator
You can try

Code: Select all

#define _doNothing 0
#define _doBuy     1
#define _doSell    2

curTrend =iCustom(NULL, 0, "step nema (mtf + alerts + arrows)",PERIOD_CURRENT,NEMAperiod, 2, 0.5, 50.0,0,false,0.0,0.0,0,3,1,false, false, false, false,false,false,159,159,2,2,0.5,0.5,true,true, 9, 1);
preTrend =iCustom(NULL, 0, "step nema (mtf + alerts + arrows)",PERIOD_CURRENT,NEMAperiod, 2, 0.5, 50.0,0,false,0.0,0.0,0,3,1,false, false, false, false,false,false,159,159,2,2,0.5,0.5,true,true, 9, 2);

if (curtrend!=pretrend)
         if (curtrend==1)
               doWhat = _doBuy;
         else  doWhat = _doSell;
         if (doWhat==_doNothing) return;

Then enter _doBuy and _doSell in their respective places.

Re: Coding Help

Posted: Wed Apr 19, 2023 6:00 am
by kkfx
Thank you. This one is step NEMA EA