Multiple positions
Posted: Oct 31 2020
Good evening, I have been having serious difficulties for several days in using multiple positions in the same direction.
Separately, the two buy and sell orders work, but when I try to combine them, only the "Fa" order is executed. I've really tried them all but I can't understand what trivial mistake I make. Can you help me?
Thanks
Separately, the two buy and sell orders work, but when I try to combine them, only the "Fa" order is executed. I've really tried them all but I can't understand what trivial mistake I make. Can you help me?
Code: Select all
inputs:
...
variables:
...
SONOLONG = (marketposition = 1 and close < liv_x);
if marketposition = 0 then
begin
...
liv_x = low;
meta_candela=(high-low)/2;
...
switch (trigger) //INGRESSO A MERCATO
begin
case "F":
buy ("Fa") next bar at open ;
buy ("Fb") next bar at meta_candela limit;
end;
end;
switch (StopLossMode)
begin
case (1):
if SONOLONG then begin //STOP LOSS//
sell ("SLl1") this bar from entry ("Fa") on close; //
sell ("SLl2") this bar from entry ("Fb") on close; //
end;
if SONOSHORT then
....
end;