But you can't!!!
what should it do
when I trade an order by hand it should put a stop according to ATR
I use the signal From Brocker to Strategy
can someone help me with what I'm doing wrong?
Inputs:
tradevolume ( 1 ),
Target_1 ( 1 ),
Target_2 ( 1 ),
ATRLegth ( 10 ),
NumATRs ( 3 );
variable:
var0 ( 0 ),
var1 ( 0 ),
var2 ( 0 );
var0 = averagetruerange ( ATRLegth ) * NumATRs ; // Bezeichnung Indikator
var1 = marketposition ; // abfragen ob eine Position im Markt
if var1 = 1 then
begin
condition1 = var1[1] <> 1 or High > var2 ;
if condition1 then
var2 = High ;
Sell ( "ATR_Long" ) next bar at var2 - var0 Stop ;
end
else
sell ( "AtrLX-eb" ) next bar at High - var0 stop ;