moomoofx wrote:"Net Stop" mode such that it sets the stops on all trades to be the net break-even --- added to the to-do list.
Cheers,
MooMooForex
Terrific, thanks so much!
Moderator: admin
moomoofx wrote:"Net Stop" mode such that it sets the stops on all trades to be the net break-even --- added to the to-do list.
Cheers,
MooMooForex
if (tradeRow.IsBuy) then
stopValue = openPrice + (gap * instance.bid:pipSize());
elseif (not tradeRow.IsBuy) then
stopValue = openPrice - (gap * instance.bid:pipSize());
end
if (tradeRow.IsBuy) then
stopValue = openPrice + (gap * instance.bid:pipSize());
-- check if the stop is better than the BreakEven level, if so, do nothing and exit
if stopValue < tradeRow.Stop then
return;
end
elseif (not tradeRow.IsBuy) then
stopValue = openPrice - (gap * instance.bid:pipSize());
-- check if the stop is better than the BreakEven level, if so, do nothing and exit
if stopValue > tradeRow.Stop then
return;
end
end
Users browsing this forum: No registered users and 61 guests