[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EL code for multiple exits



PureBytes Links

Trading Reference Links

I could use some help in two areas of EL coding.
First....
How to write code to exit from multiple entries.  For example, if I am long
3 contracts, how do I write a code once an entry price has been established
to exit first contract at "price" plus 1.0 point, the second at price plus
2.0 and the third at price + 3 (or more points)?  If after hitting first
target, another set of conditions call for the exit of the other two, how
do I write:  in lieu of exiting at 2.0 points and at 3.0 points, exit both
at "condition X" and cancel other two targets.

2nd...
If I am using an XAverage(C,10) for example, how do I write another
indicator to plot an average of the XAverage(C,10) with input option to
change bars back settings.  Would it simply be:  Average(XAverage(C,10))?.