Hi,
Could someone please show me a easy way to use marketposition to initially get into a trade on either side, then use the marketposition to cover the last trade and flip on the opposite signal. I have tried everything I could find in the forums and think of yet my script always leaves me flat.. This was my last attempt.
Thanks
if Trigger crosses under wave then
begin
if MarketPosition = 0 then
begin
Buy ( "Buy" ) next bar at market ;
end;
if MarketPosition = -1 then
begin
buytocover("CoverS") next bar at market ;
Buy("ReverseL") next bar at market ;
end;
Alert("Buy Alert Up Direction ");
end;
if Trigger crosses over wave then
begin
if marketposition = 0 then
begin
Sell("Short") next bar at market ;
end;
if MarketPosition = 1 then
begin
sell("CoverL") next bar at market ;
Sell("ReverseS") next bar at market ;
end;
Alert("Sell Alert Dn Direction ");
end;
marketposition question
-
- Posts: 173
- Joined: 25 Aug 2007
Thanks Super
That part works, but what I am tryin to achieve is to cover a position if I am not flat then reverse so effectively if I was Long I would sell 2 contracts which would make reverse with 1 contract Short. If I was short I would buy 2 contracts. I tried using the contracts word and a few others with no success.
That part works, but what I am tryin to achieve is to cover a position if I am not flat then reverse so effectively if I was Long I would sell 2 contracts which would make reverse with 1 contract Short. If I was short I would buy 2 contracts. I tried using the contracts word and a few others with no success.
the posted code will do exactly what you are looking for in your case for example you are long one contract then it issues order to sell two contract effectively reversing your position.
maybe there is something I am missing out in your explanation, maybe you can provide me with some simple example, if not me then some one else can help you out.
regards
Super
maybe there is something I am missing out in your explanation, maybe you can provide me with some simple example, if not me then some one else can help you out.
regards
Super
-
- Posts: 173
- Joined: 25 Aug 2007
Auto stop trail
Hi,
Does anyone have a example of auto chasing a stop on orders once they are going in the right way ?
Thanks
Does anyone have a example of auto chasing a stop on orders once they are going in the right way ?
Thanks
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007