How to send a pending order after open a trade

User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

How to send a pending order after open a trade

Post by renexxxx »

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!
fxcba
Trader
Posts: 46
Joined: Wed Aug 21, 2013 10:10 pm

How to send a pending order after open a trade

Post by fxcba »

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?
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

How to send a pending order after open a trade

Post by SteveHopwood »

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:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Locked

Return to “Newbie Discussion”