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) |