Hi, i'm coding a signal and i like to know if it's possibile to have a variable that told you if the last order was triggered by a stoploss or by a takeprofit.
i declare this:
.....
Setprofittarget_pt(100);
SetStopLoss_pt(200);
....
I'd like to know if SetStopLoss has been taken or not, or the profittarget as been taken. So the second order will be different
Example:
If last.order stoploss taken then
begin
.......
If last.order profittarget taken then
begin
.......
There is so a variable that told you this?
Thanks in advance for your help
Filippo
Last order status
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Last order status
Hello, filippo.milano
Here is the example with exitname keyword:
once cleardebug;
if marketposition = 0 then
print (datetostring(datetime) ," ",exitname(1))
Here is the example with exitname keyword:
once cleardebug;
if marketposition = 0 then
print (datetostring(datetime) ," ",exitname(1))