Sunday, August 01, 2010     | Register
TradersStudio Forums
Subject: Refrencing the previous trade's profit in a session

You are not authorized to post a reply.   
Author Messages
Cowpux
Posts:6

09-04-2008 7:47 PM Alert 

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.
Forums > TradersStudio 2.x > TradersStudio Basic > Refrencing the previous trade's profit in a session



ActiveForums 3.6
TradersStudio® Copyright 2004-2010 All Rights Reserved   |  Privacy Statement  |  Terms Of Use