Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Entry and Exit with LotAmount different #474922
11/13/18 12:53
11/13/18 12:53
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Hi all,

why my strategy open the position with 14000 and close it only 1000? This happened not always but happen. Why?

thanks

Re: Entry and Exit with LotAmount different [Re: tradingest] #474924
11/13/18 13:09
11/13/18 13:09
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Post your script.

Re: Entry and Exit with LotAmount different [Re: AndrewAMD] #474929
11/13/18 22:40
11/13/18 22:40
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Below the code applied on MT4
Code:
function run(){

	set(LOGFILE);  // generate and use optimized parameters
	LookBack = 1;
	BarPeriod = 1; 
	assetList("AssetsFXCM10cross");
	asset("EUR/USD");
	LotAmount = 14000;
	if (NumOpenTotal<1){
		enterShort();
		Stop=PIP*50;
		TakeProfit=PIP*50;
	}
	
}


Last edited by tradingest; 11/13/18 22:49.
Re: Entry and Exit with LotAmount different [Re: tradingest] #474932
11/13/18 23:28
11/13/18 23:28
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
I only see an entry short and no exits.

Oh, I see you’re trying to set stops, but you need to set that up **before** you enter short. So it needs to be fixed.

Re: Entry and Exit with LotAmount different [Re: AndrewAMD] #474934
11/14/18 08:02
11/14/18 08:02
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Fix the stop, upgrade to 1.96, and update the Zorro.mq4 EA. If you then still have problems, please contact Support with the Zorro and MT4 logs.

Re: Entry and Exit with LotAmount different [Re: AndrewAMD] #474937
11/14/18 08:56
11/14/18 08:56
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Originally Posted By: AndrewAMD
I only see an entry short and no exits.

Oh, I see you’re trying to set stops, but you need to set that up **before** you enter short. So it needs to be fixed.


Thanks Andrew, your contribution is very useful

I add my doubt.
I see that the stop is sent to the broker while the profit is not sent but when it's reached the position exit correctly.
The TakeProfit it's executed like a market order?
Is it possible to set it like a pending order?

thanks again


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1