stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

How to send a pending order after open a trade
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4916
Page 2 of 2
Author:  renexxxx [ Wed Nov 02, 2016 7:20 pm ]
Post subject:  How to send a pending order after open a trade

Also, to make it meaningful code, you have to fill the rsibuf[] first in a separate loop, like so:

Code: Select all

double rsibuf[];
ArrayResize(rsibuf, limit+1);
ArrayInitialize(rsibuf, 0.0);

for(shift=limit; shift>=0; shift--) {
   rsibuf = iRSI(NULL,0,RSIbarsPeriod,PRICE_CLOSE,shift);
}

for(shift=limit-MAPeriod-1; shift>=0; shift--) {
   b4ma = iMAOnArray(rsibuf,0,MAperiod,0,MODE_SMA,shift+1);
   nowma = iMAOnArray(rsibuf,0,MAperiod,0,MODE_SMA,shift);
}
Also, since the iMAOnArray needs to refer to MAPeriod candles before the starting shift (or shift+1), the second loop should start at limit-MAPeriod-1.

Good luck!
Author:  fxcba [ Wed Nov 02, 2016 7:33 pm ]
Post subject:  How to send a pending order after open a trade

Well, here's the indi, it compiles with no errors but it doesn't work :arrrg:
It must alert when the MA cross over the RSI line, can someone check it out please?
Author:  SteveHopwood [ Thu Nov 03, 2016 12:36 am ]
Post subject:  How to send a pending order after open a trade

I have locked this topic.

fxcba, you have shown yourself incapable of heeding the advice of Senior Members of SHF, people whose expertise is of incalculable benefit to anyone intelligent enough to take heed of them. For sure, I have benefited from them over the years to an extent that you are clearly too thick to notice.

Your best interests are served by shutting up from here on in. There is much that you can learn if you are not a total dimwit. For sure, bother me again and I will ban you. SHF is not a place for idiots, and I consider you to be an idiot.

Senior members of SHF, you know whom you are. Should you be interested in this thread, then feel free to delete this post and reinstate the thread. I shall not notice.

:xm:
All times are UTC Page 2 of 2