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

El help: ShowMe



PureBytes Links

Trading Reference Links

The below code is an attempt to create a ShowMe in TS2000i showing the
days in a trade for post trading study purposes. This example would be for
three short trades.  My problem is  the second and third trades enter
a day later than the dates in the Input and also, when you have an
exit and entry back in on the same day how can that be shown as two
trades rather than one continuous trade?  Any help and/or
simplification would be appreciated.
---------------------------------------------------------------------------
{A ShowMe showing days in the market short for three trades. in this
example, short on 02/20/2003 and out on 03/13/2003, short on 03/27/2003
and stopped out the same day, back short on same day, 03/27/2003, 
and out on 04/02/2003}


Input:  InShortDay1(1030220),OutShortDay1(1030313);
Input:  InShortDay2(1030327),OutShortDay2(1030327);
Input:  InShortDay3(1030327),OutShortDay3(1030402);

Var: Count(-1), Sbar(0);

If Date=InShortDay1 then sbar = currentbar;
If Sbar <> 0 then begin
        Count = Count + 1;
        Plot1(Low,"InShort");
        If date = OutShortDay1 then sbar = 0;

End;

If Date=InShortDay2 then sbar = currentbar;
If Sbar <> 0 then begin
                Count = Count + 1;
        Plot2(Low,"InShort");
        If date = OutShortDay2 then sbar = 0;

End;

If Date=InShortDay3 then sbar = currentbar;
If Sbar <> 0 then begin
                Count = Count + 1;
        Plot3(Low,"InShort");
        If date = OutShortDay3 then sbar = 0;
        

End

  

-- 
Best regards,
 Grover                          mailto:grover@xxxxxxxxxxxx