I have a strategy on Gold futures that uses SetBreakEven and SetStopLoss. The SetBreakEven worked in the MC chart where I have the strategy but MC didn't send the BE stop loss order to the broker. Hoewever, I did get stopped out at a loss when the SetStopLoss order triggered. The result is that I have a trade with a breakeven P&L in MC but a trade that is a loss at my broker (InteractiveBrokers).
Any idea why this happened?
Regards
Cagmad
SetBreakEven worked in MC but didn't send order to Broker
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: SetBreakEven worked in MC but didn't send order to Broker
I have a strategy on Gold futures that uses SetBreakEven and SetStopLoss. The SetBreakEven worked in the MC chart where I have the strategy but MC didn't send the BE stop loss order to the broker. Hoewever, I did get stopped out at a loss when the SetStopLoss order triggered. The result is that I have a trade with a breakeven P&L in MC but a trade that is a loss at my broker (InteractiveBrokers).
Any idea why this happened?
Regards
Cagmad
Can't tell you much without seeing the codes.
Re: SetBreakEven worked in MC but didn't send order to Broker
Inputs MyStop, MyBreakEven and MyProfit are all >0. The SL worked (sent instruction to broker) but not the BE. At the very end of the strategy code, I have the SL, BE and PT instructions.
Code: Select all
setstopcontract;
If MyStop > 0 then setstoploss(MyStop*bigpointvalue);
If MyBreakEven > 0 then setbreakeven(MyBreakEven*bigpointvalue);
If MyProfit > 0 then setprofittarget(MyProfit*bigpointvalue);
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: SetBreakEven worked in MC but didn't send order to Broker
Inputs MyStop, MyBreakEven and MyProfit are all >0. The SL worked (sent instruction to broker) but not the BE. At the very end of the strategy code, I have the SL, BE and PT instructions.
Code: Select all
setstopcontract;
If MyStop > 0 then setstoploss(MyStop*bigpointvalue);
If MyBreakEven > 0 then setbreakeven(MyBreakEven*bigpointvalue);
If MyProfit > 0 then setprofittarget(MyProfit*bigpointvalue);
See post #5
viewtopic.php?t=10811
Re: SetBreakEven worked in MC but didn't send order to Broker
Post #5 says that the problem may have been caused by placing global exits inside a condition. I use setstoploss and setprofit targets inside conditions with other strategies and I haven't had any problems in the past. This is the first time, though, that I use setbreakeven in addition to the other two.
I will make changes so there is no conditional and see whether that solves the issue.
Thanks and regards
Cagmad
I will make changes so there is no conditional and see whether that solves the issue.
Thanks and regards
Cagmad