Hello,
looking in the forum, found sample with or without "total", not working in my case.
If time >= HeureDebut and time < HeureFin and marketposition =0
and var2 crosses over var3 and var2 < STOOverSold then begin
buy ("ini") 1 shares this bar on close;
end;
If time >= HeureDebut and time < HeureFin and marketposition =1 and var2 crosses over var3 and var2 < STOOverSold then begin
buy ("pyramid") 1 contract this bar on close;
end;
If marketposition =1 and var2 crosses under var3 and var2 > STOOverBought then begin
sell ("partial") 1 contract total this bar on close;
// try two : sell ("partial") 1 contract this bar on close;
end;
If marketposition =1 and c > ValRet then begin
sell ("Full Exit") all contract this bar on close;
end;
with total : all position are close 1 by 1 on the same bar
without total : all positions are close in 1 operaation on the same bar
many thanks for any help
regards
Partial exit on pyramid
-
- Posts: 103
- Joined: 05 Sep 2007
- Has thanked: 8 times
- Been thanked: 6 times
-
- Posts: 103
- Joined: 05 Sep 2007
- Has thanked: 8 times
- Been thanked: 6 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
-
- Posts: 103
- Joined: 05 Sep 2007
- Has thanked: 8 times
- Been thanked: 6 times
Please find scrren attached.
remenber my problem is :
with total : all position are close 1 by 1 on the same bar
without total : all positions are close in 1 operaation on the same bar
I have 1 initial entry, followed by many entry and/or partial exit, and maybe a final exit (if after last partial exit still exist 1 position)
I can have :
1 first
1 follow
1 partial exit
1 follow
1 follow
1 partial exit not all follow
With my code, it always close all partial open in 1 time. all in 1 candle or each separate but on the same candle.
many thanks for your help
laurent
remenber my problem is :
with total : all position are close 1 by 1 on the same bar
without total : all positions are close in 1 operaation on the same bar
I have 1 initial entry, followed by many entry and/or partial exit, and maybe a final exit (if after last partial exit still exist 1 position)
I can have :
1 first
1 follow
1 partial exit
1 follow
1 follow
1 partial exit not all follow
With my code, it always close all partial open in 1 time. all in 1 candle or each separate but on the same candle.
many thanks for your help
laurent
- Attachments
-
- MC-Code.JPG
- code. I try with "sell 1 contract " and "sell 1 contract total"
- (30.42 KiB) Downloaded 769 times
-
- MC-total.JPG
- exit with "total"
- (35.57 KiB) Downloaded 770 times
-
- MC-exit no total.JPG
- exit without "total"
- (31.25 KiB) Downloaded 771 times
-
- MC-properties.JPG
- properties
- (46.88 KiB) Downloaded 772 times
-
- MC-settings.JPG
- settings
- (36.96 KiB) Downloaded 774 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
-
- Posts: 103
- Joined: 05 Sep 2007
- Has thanked: 8 times
- Been thanked: 6 times
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
-
- Posts: 103
- Joined: 05 Sep 2007
- Has thanked: 8 times
- Been thanked: 6 times
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
-
- Posts: 103
- Joined: 05 Sep 2007
- Has thanked: 8 times
- Been thanked: 6 times
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact: