Has anyone worked on something similar? I think that a project like this might help those who are wanting a separate form of exporting the trade lists instead of waiting 2343242 hours for the export a Performance Report.
I started working on this and realized that our key words do not help much with this project. I would love for someone with more know-how to lend a hand at jump starting this project. Here was my start (which is incorrectly constructed):
Code: Select all
VARIABLES:
intrabarpersist MPos( 0 ),
Logger("C:\Users\Name\Desktop\TradeList"),
vShares( 0 ) ;
MPos = MarketPosition ;
vShares = MPos-MPos[1] ;
Once begin
Print(File(Logger), "Order;DateTime;Contracts;Price;Profit" ) ;
end ;
//Reverse to Long
if MPos[1]<0 and MPos>0 then begin
Print(File(Logger),"Short Exit",";",ExitDateTime(0),";",vShares,";",ExitPrice(0),";",PositionProfit(1) ) ;
Print(File(Logger),"Long Entry",";",EntryDateTime(0),";",vShares,";",EntryPrice(0),";",0 ) ;
end else
//Reverse to Short
if MPos[1]>0 and MPos<0 then begin
Print(File(Logger),"Long Exit",";",ExitDateTime(0),";",vShares,";",ExitPrice(0),";",PositionProfit(1) ) ;
Print(File(Logger),"Short Entry",";",EntryDateTime(0),";",vShares,";",EntryPrice(0),";",0 ) ;
end else
//Entry Long
if MPos[1]=0 and MPos>0 then
Print(File(Logger),"Long Entry",";",EntryDateTime(0),";",vShares,";",EntryPrice(0),";",0 )
else
//Enter Short
if MPos[1]=0 and MPos<0 then
Print(File(Logger),"Short Entry",";",EntryDateTime(0),";",vShares,";",EntryPrice(0),";",0 )
else
//Exit Long
if MPos[1]>0 and MPos=0 then
Print(File(Logger),"Long Exit",";",ExitDateTime(0),";",vShares,";",ExitPrice(0),";",PositionProfit(1) )
else
//Exit Short
if MPos[1]<0 and MPos=0 then
Print(File(Logger),"Short Exit",";",ExitDateTime(0),";",vShares,";",ExitPrice(0),";",PositionProfit(1) ) ;