This is my first time trading overnight, testing on real trading,
I found MC sent an unnecessary (I think this is because of my ignorance, but why?)
Here is the case:
There is a next bar stop-loss into the strategy, and the stop-loss correctly was not triggered on 5 of May, but problems found on the next day.
On 6 of May morning:
2021-05-05 17:15 exit / stop / sell@27868 : saved ( last night stop-loss, this is correct, and MC saved it for me)
2021-05-06 08:18 entry / stop / sell@27868: sent ( problem here, I have no sellshort strategy)
2021-05-06 0914 exit / stop / sell@27868: sent (My strategy's exit, this is correct)
* The markets opens at 09:14*
*1 contract only*
*long only*
I think MC sent a sell entry before the market opens is reasonable,
however,
the "sell entry" keeps sent and not canceled the whole day after the strategy stop-exit is placed.
For instance, if the stop-loss was triggered, is it imply -2 (one sell and one sellshort) in total?
This makes me feel scared, I have no sellshort order in the strategy and no stop-loss for it.
thanks to all friends and veterans.
screen capture and code as following:
Code: Select all
//Long only overnight MHI
//1 min chart
//start using on 2021-05-03
//condition
condition1 = time > 0918 and time < 1530;
//entry
if condition1 and condition2 and condition3 and condition4 then
buy ("b1") 1 contract next bar highestfc(high,250) stop;
//exit
//stoploss
if marketposition>0 then begin
sell("sL1") next bar entryprice - 500 stop;
end;
//stopgain
value1 = maxpositionprofit/bigpointvalue;
if marketposition > 0 and maxpositionprofit>= 4000 then begin
sell ("sG1") next bar entryprice + (value1 - value1*0.1) stop;
end;
//final exit
if dayofmonth(date) >=26 then
sell ("fs") next bar market;
//STRATEGY END