I understand that the strategy is bad, i dont mind margin call actually, its just, there are trades that exit at 0 sec after it enter which is kinda weird for me, since I did not set up a stop loss and risk which is now default to 0 and the code doesnt have exitLong() that would make the trade exit right away. That is the mystery that i am trying to look out for days.

Here is the testrade logs of some part on the image. ive also display the duration of the trade.

Code
"Name","Type","Asset","ID","Lots","Open","Close","Entry","Exit","Profit","Roll","ExitType","Duration"
"cloud","Long","TSLA",4802701,1,2019-03-20 09:07:00,2019-03-20 09:07:00,269.22,269.02,-200,0,"Sold",0
"cloud","Long","TSLA",4803601,1,2019-03-20 09:16:00,2019-03-20 09:16:00,269.22,269.02,-200,0,"Sold",0
"cloud","Long","TSLA",4805101,1,2019-03-20 09:31:00,2019-03-20 09:31:00,269.95,269.75,-200,0,"Sold",0
"cloud","Long","TSLA",4805801,1,2019-03-20 09:38:00,2019-03-20 09:38:00,270,269.64,-365,0,"Sold",0