Ok, I think you can see what I'm trying to do here....
I want to record to the journal when a trade loses....
So I pop this little function in just before the order closes...
PHP Code:
RecordLongOutcomes();
OrderClose(OrderTicket(),OrderLots(),Bid ,SlipPage,Violet); // We close the order
return(0);
Trouble is that it's not Printing....
In fact when the tester hit's a stop loss it doesn't care about this code and it just closes....
PHP Code:
/////////////record outcomes/////////////////
void RecordLongOutcomes()
{
if(Bid<OrderOpenPrice())
{
OrderSelect(OrderTicket(),SELECT_BY_POS,MODE_TRADES);
Print(" Loser Long ",OrderTicket()," Opened: ",OrderOpenPrice()," Closed: ", Bid);
}
return (0);
}
So How do I get this data to trigger on the close and print to the journal?