PureBytes Links
Trading Reference Links
|
> BUT....the "killer" in all of this:
> 1) can't use a variable for the signal id
> ex: buy(entry_x) at market;
> 2) can't detect WHICH exit or Which ENTRY actually occurred
> ex: if BarsSinceExit(1)=1 and WhichExit="myexit" then alert("myexit was
> fired-off previous bar");
Ok maybe I wasn't clear...now I will make an example to make the
problem clear:
Assuming that I want to put together 3 "Signal" in the same
"Strategy" (we can just create the three signals and putting them
into a strategy)
{1st signal}
if currentbar=10 then sell1 contract;
{2nd signal}
if currentbar=15 then buy1 contract at Close/2 stop ;
{3rd signal}
if currentbar=15 then buy 1 contract at Close/2 stop ;
After currentbar 15 we all would like to be1 contracts long, isn't
so? No, allowing different entrieswe are2 long.....
We could try following the suggestion of our friend who tried to give
a solution making in this way:
{1st signal}
if currentbar=10 then sell1 contract;
{2nd signal}
if currentbar=15 then begin
if marketposition>=0 then buy1 contract at Close/2 stop else
exitshort 1 contract total at Close/2 stop;
end;
{3rd signal}
if currentbar=15 then begin
if marketposition>=0 then buy1 contract at Close/2 stop else
exitshort 1 contract total at Close/2 stop;
end;
...no, nothing to do! now we are Flat!!
you can also try giving a name to all buy and sell orders like
Buy("Buy1") trying eventually to close them with "exitlong 1
contract total from entry("Buy1")" etc but as result the position
will never be the right one
and so..which is the conclusion? Simply that is impossible to join
together different Signals as Omega pretends with the
"Strategy"unless we don't want to risk terrible mistakes in the
position.
The easiest solution could be foreveryonehave implemented "from
entry("xy")" also for buy and sell orders like it already appens for
exitlong and exitshort ones allowing for example to close with a
"Sell("S1") 1 contract from entry("B1")" only the positions
generated by "Buy("B1") 1 contract from entry("S1")"
But right now this is not possible...
Always at your disposal if someone else thinks it is possible to put
different Signals together. :)
regards
|