MA Stop Loss
-
hamburglar
- Trader
- Posts: 27
- Joined: Sun Nov 27, 2011 8:08 pm
MA Stop Loss
Has anyone come across an EA or indicator that moves SL according to that MA on a specific timeframe?
- Dixpat
- Trader
- Posts: 33
- Joined: Tue Nov 15, 2011 9:32 pm
- Location: Auckland. NZ
Re: MA Stop Loss
I am not sure whether the attached is what you are after.
I have never used it and have downloaded it from another site [free download so not stopping the coder making a living!]
The description of action:
Script watching the order. Move a level stoploss after value specified MovingAverage. If the set a pending order the script waits for its execution, and only is open then will watch it. If the order was closed or deleted, the script automatically finished the work. Can be attached to the chart of any currency pair, but thus for calculation MovingAverage the time period of the chart is used.
Assignment:
The script allows to automate trade. It is useful to those who uses value MovingAverage as a level stoploss. Open a position or pending order, start a script and you should not watch a position any more. Simultaneous use together with other scripts watching the order is supposed.
Parameters:
ticket = the unique identifier of the order. It can be found in a column "Order" of the tab "Trade" of the terminal.
offset_from_value_ma = the offset (in points) a new level stoploss from the value of MovingAverage. Positive value - aside the profit, negative value - aside the loss.
ma_period = the period of MovingAverage.
ma_method = the method of MovingAverage. Possible values: 0 - Simple MovingAverage, 1 - Exponential MovingAverage, 2 - Smoothed MovingAverage, 3 - Linear weighted MovingAverage.
ma_shift = the shift of MovingAverage from the chart; Value should not be less than 0.
ma_price = the price used for calculation of MovingAverage. Possible values: 0 - Close price; 1 - Open price; 2 - High price; 3 - Low price; 4 - Median price; 5 - Typical price; 6 - Weighted price.
step_of_move = step of moving (in points) trailingstop; value should be more than 0.
delay = frequency of a check up status of orders. It is set in milliseconds, for example value 5000 means periodicity of 5 seconds. It is necessary to remember, that too often periodicity can brake the terminal.
I have never used it and have downloaded it from another site [free download so not stopping the coder making a living!]
The description of action:
Script watching the order. Move a level stoploss after value specified MovingAverage. If the set a pending order the script waits for its execution, and only is open then will watch it. If the order was closed or deleted, the script automatically finished the work. Can be attached to the chart of any currency pair, but thus for calculation MovingAverage the time period of the chart is used.
Assignment:
The script allows to automate trade. It is useful to those who uses value MovingAverage as a level stoploss. Open a position or pending order, start a script and you should not watch a position any more. Simultaneous use together with other scripts watching the order is supposed.
Parameters:
ticket = the unique identifier of the order. It can be found in a column "Order" of the tab "Trade" of the terminal.
offset_from_value_ma = the offset (in points) a new level stoploss from the value of MovingAverage. Positive value - aside the profit, negative value - aside the loss.
ma_period = the period of MovingAverage.
ma_method = the method of MovingAverage. Possible values: 0 - Simple MovingAverage, 1 - Exponential MovingAverage, 2 - Smoothed MovingAverage, 3 - Linear weighted MovingAverage.
ma_shift = the shift of MovingAverage from the chart; Value should not be less than 0.
ma_price = the price used for calculation of MovingAverage. Possible values: 0 - Close price; 1 - Open price; 2 - High price; 3 - Low price; 4 - Median price; 5 - Typical price; 6 - Weighted price.
step_of_move = step of moving (in points) trailingstop; value should be more than 0.
delay = frequency of a check up status of orders. It is set in milliseconds, for example value 5000 means periodicity of 5 seconds. It is necessary to remember, that too often periodicity can brake the terminal.
You do not have the required permissions to view the files attached to this post.
-
hamburglar
- Trader
- Posts: 27
- Joined: Sun Nov 27, 2011 8:08 pm
Re: MA Stop Loss
thank you Dixpat i'll give it a try!!