Pending MA Buy limit & Sell Limit Script - page 2

 
romotly007:
There is a problem cja, I wanted to run the script on 2 different MAs I use for trading by putting two inputs.mql4 in the indicator folder with different settings as well as having two Pending set @MA v1.ex4 in the script folder. I could only execute one settings successfully. What do I do?

There is no problem you originally said you wanted to have a script place an order on a MA price no mention of multiple MAs being used?

How did you run 2 inputs indicators because you must have had to change the name of one of them because you cannot have 2 indicators with the same name in the same folder? if you did change the name then the Script would not have recognized the inputs.

Are there any other trading conditions that I will need to know about? if there are then now is the time to let me know before I do any more coding.

 
cja:
There is no problem you originally said you wanted to have a script place an order on a MA price no mention of multiple MAs being used? How did you run 2 inputs indicators because you must have had to change the name of one of them because you cannot have 2 indicators with the same name in the same folder? if you did change the name then the Script would not have recognized the inputs. Are there any other trading conditions that I will need to know about? if there are then now is the time to let me know before I do any more coding.

Hello cja, its not multiple MAs in one script that I needed thats why I requested for the mql4 file in the first place. I could change its name and have two of it with different settings run on my chart using separate hotkeys. I placed two inputs.mql4 file in the indicator folder with one of them like this "inputs.mql4 (2)" and did the same for the Pending set @MA v1.ex4. I thought Pending set @MA v1(2) would wok with inputs.mql4(2) but that didn't happen.

 

It works fine for me (from the original request)

Thanks cja

 
romotly007:
Hello cja, its not multiple MAs in one script that I needed thats why I requested for the mql4 file in the first place. I could change its name and have two of it with different settings run on my chart using separate hotkeys. I placed two inputs.mql4 file in the indicator folder with one of them like this "inputs.mql4 (2)" and did the same for the Pending set @MA v1.ex4. I thought Pending set @MA v1(2) would wok with inputs.mql4(2) but that didn't happen.

Thats why it did not work as I stated in the original post

"5/ Do not change the name of the "inputs" indicator as the script will not recognize the inputs if you do."The script uses an iCustom call for the imports so as soon as you change the name of the inputs indicator the script cannot find the indicator and if it cannot find the indicator it cannot set the inputs.

Here are 2 more scripts and inputs indicators the extra is in case you might need it.

inputs2.mq4

pending_set__ma_v2.ex4

inputs3.mq4

pending_set__ma_v3.ex4

 

Thank you cja ....it seems the script is not working on 5 digits metatrader 4 platform. I moved to a new broker called XM and I couldn't run all my scripts in their 5 digits platform .....I tried to run my scripts and I kept getting script removed or uninit reason 0 or uninit reason 1. What could be the problem?

 
romotly007:
Thank you cja ....it seems the script is not working on 5 digits metatrader 4 platform. I moved to a new broker called XM and I couldn't run all my scripts in their 5 digits platform .....I tried to run my scripts and I kept getting script removed or uninit reason 0 or uninit reason 1. What could be the problem?

The scripts work on my 5 digit broker, perhaps your new broker does not allow pending orders to be set as close as your previous broker. If that is the case then the script will not place a pending order if the MA is within that zone. Here is a simple script I use to see what STOPLEVEL the broker has for different currency pairs, it puts a comment in the top left of the chart. Other than that I have no idea why the script/s are not working and I suggest you contact the broker and ask them.

mode_stoplevel.ex4

Files:
 
cja:
The scripts work on my 5 digit broker, perhaps your new broker does not allow pending orders to be set as close as your previous broker. If that is the case then the script will not place a pending order if the MA is within that zone. Here is a simple script I use to see what STOPLEVEL the broker has for different currency pairs, it puts a comment in the top left of the chart. Other than that I have no idea why the script/s are not working and I suggest you contact the broker and ask them. mode_stoplevel.ex4

Thank you cja...I have fixed the problem by allowing automated trading in the Toos>Option area. I really appreciate your assistance. One last script (on my knees begging), could you please do a similar script based on Bollinger Bands for me. When price is above the middle line and I run the script, it sets a sell limit pending order on the Upper Band price level and when the price is below the middle line and I run the script it set a buy limit pending order on the Lower Band price level. Thank you for your help.

 
romotly007:
Thank you cja...I have fixed the problem by allowing automated trading in the Toos>Option area. I really appreciate your assistance. One last script (on my knees begging), could you please do a similar script based on Bollinger Bands for me. When price is above the middle line and I run the script, it sets a sell limit pending order on the Upper Band price level and when the price is below the middle line and I run the script it set a buy limit pending order on the Lower Band price level. Thank you for your help.

I am presuming that you will be using only one Bollinger Bands setting and not several on the same chart?

bollinger_script_inputs.mq4

pending_set__bollingerbands.ex4

 
cja:
I am presuming that you will be using only one Bollinger Bands setting and not several on the same chart?

bollinger_script_inputs.mq4

pending_set__bollingerbands.ex4

Thank you cja and am very sorry for the delayed response. I tested it and it worked perfectly and I really appreciate your effort to put a smile on my face. You are very kind indeed. Thank you once again and God bless.

 

Hello cja, am very sorry to bother you again. I just want all my trades to be semi-automated using scripts. Could you please code a script based on MA and only Fibo 0%, 50% and 100% such that when MA cross Fibo 50% up and I run the script anytime, it sets a buy limit pending order on the Fibo 50% price level and at the same time setting a sell limit pending order on the upper Fibo 0% or 100% price level. And when MA has crossed 50% down and I run the script anytime, it sets a sell limit pending order on the Fibo 50% price level and at the same time setting a buy limit pending order on the lower Fibo 0% or 100% price level. Also when MA is above 0% or 100% and I run the script anytime, it sets a buy limit pending order on only the 0% or 100% price levels. Likewise when MA is below the 0% or 100% and I run the script anytime, it sets a sell limit pending order on only the 0% or 100% price level. I hope my explanation is understandable enough? Thank you so much.

Reason: