SetStopPosition versus SetStopContract for FOREX instruments

Questions about MultiCharts and user contributed studies.
mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

SetStopPosition versus SetStopContract for FOREX instruments

Postby mefTrader » 16 Apr 2012

MC 7.4 Release (Build 4906)

I have the following code

to book profit/loss with the EURUSD

Code: Select all

buy("Long") 100000 contracts next bar at buy_level stop;
SetStopPosition;

SetProfitTarget(trail_stop_short*100000);

setstoploss(trail_stop_short*100000);
trail_stop_short = 4 pips! and I am happy with how this code works. Generates over 900 trades..

Before I can add pyramiding I must switch "SetStopPosition" to "SetStopContract". I should expect no difference in performance for 1 Lot /100000 ? as max contracts is 1 lot... This is what I see with Futures and make sesnse to me..

I am seeing that when I use "SetStopContract" it get 'stuck' by trade number 5 meaning that it does not book out a profit defined by "SetProfitTarget(trail_stop_short*100000);"

Can "SetStopContract" be used with FX?
Seems only "SetStopPosition" works with FX - is this correct - does not seem right to me?

Regards

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: SetStopPosition versus SetStopContract for FOREX instrum

Postby Henry MultiСharts » 16 Apr 2012

This question has been answered during the live chat session.
When you use SetStopContract in the code the specified in brackets "Amount" is the amount of profit for 1 contract.
In this particular case the target profit/loss should not be multiplied by the amount of contracts in order to achieve the same results compared to SetStopPosition usage.


Return to “MultiCharts”