Register Login
Forums    February 6, 2012
TradersStudio Forums
Refrencing the previous trade's profit in a session
Last Post 09-04-2008 07:47 PM by David Hubbard. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
David Hubbard
New Member
New Member
Posts:6

--
09-04-2008 07:47 PM

    I am trying to refrence the previous trade's closed Trade profit/loss in a system.  It is a counter trend trading system and I want to limit the number of times I get burned in trying to initiate a counter trend trade.  Can someone give me a simple code sample of how to reference the previous trade's closed P/L?  I tried this line of code and it did not work for me.  There must be some concept I am totally missing.

    FYI MP is hardcoded to be marketpos(0) and mp2 is a bar array of MP.

    if MP=1 then

    If getexitprice(1)-getentryprice(1)<0 And mp2=1 Then
                        Losers=Losers+1
    EndIf

    EndIf

    Thanks,

    David (AKA Cowpux)

    You are not authorized to post a reply.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement