new order after stop loss
            
                 23 Nov 2016, 14:59
            
                    
Hi all,
How do I code to open a new order only after stop loss is triggered on an opened position.
Example,
ExecuteMarketOrder(tradeType, Symbol, volume, "Martingale", StopLoss, TakeProfit);
kind regards
Replies
... Deleted by UFO ...
... Deleted by UFO ...
                     alexander.n.fedorov
                     13 Jan 2019, 18:03
                                    
How can I use that
            position = args.Position;
            position.StopLossTriggerMethod;
            {
}
@alexander.n.fedorov
                     PanagiotisCharalampous
                     14 Jan 2019, 11:10
                                    
Hi Sasha,
This enum indicates the way SL was triggered. Here are the enum values.
Best Regards,
Panagiotis
@PanagiotisCharalampous
                     alexander.n.fedorov
                     14 Jan 2019, 13:49
                                    
Logged in.
Still, for me it is not clear
What I want to is if the order stoppped our, open new order in opposite directionat the point where it was stopped out. It will take me a week to figure out
Panagiotis, help, please
Rregards
Sasha
@alexander.n.fedorov
                     alexander.n.fedorov
                     14 Jan 2019, 13:49
                                    
RE:
alexander.n.fedorov said:
Logged in.
Still, for me it is not clear
What I want to is if the order stoppped our, open new order in opposite directionat the point where it was stopped out. It will take me a week to figure out
Panagiotis, help, please
Rregards
Sasha
p.s. stoppet out
@alexander.n.fedorov
                     alexander.n.fedorov
                     14 Jan 2019, 13:50
                                    
RE: RE:
alexander.n.fedorov said:
alexander.n.fedorov said:
Logged in.
Still, for me it is not clear
What I want to is if the order stoppped our, open new order in opposite directionat the point where it was stopped out. It will take me a week to figure out
Panagiotis, help, please
Rregards
Sasha
p.s. stopped out
@alexander.n.fedorov
                     PanagiotisCharalampous
                     14 Jan 2019, 14:11
                                    
Hi Sasha,
The specific variable has nothing to do with stop outs. If you want to know the reason of position closing use obj.Reason.
Best Regards,
Panagiotis
@PanagiotisCharalampous

davidp13
23 Nov 2016, 15:09
the easiest would be to test if a position is open or not and if not then execture the order.
Somthing like:
if position == null
executemarketorder...
@davidp13