SCRIPT Challenge :)

 

Hello, I'm just looking for a script that will trade currency pairs for me based on what I tell it are the Strong currencies and the Weak currencies.

So for example the script will have all currencies typed into the code already like the 24 IBFX currencies I want to use, USDCAD, EURGBP, GBPCHF, NZDUSD, etc .....

Now what I would like is for when I add the script to my chart, there is an option for letting it know what currencies are the Strong ones and the weak ones, so lets say the strong ones are USD,GBP and the weak ones are CHF,CAD,EUR,NZD

So all the script now needs to do is check the currency pairs for matches and place the trades, so for example by my currencies I picked above the script would place;

BUY USDCAD

BUY GBPCHF

SELL EURGBP

SELL NZDUSD

BUYs of course on Strong Base currencies and SELLs on weak base currencies and of course do nothing with the currencies that would have two weaks or two strongs.

Thank you and good luck

 

Matrix

will the script be a time loop?

will the currencies be past it by user inputs, seperate file, or from another indicator or script file.

will this script only open the orders? or wil it manage them and or close them?

Are you going to manage the orders after there placed? If thats the case then creating this limited use script would not be of any great benefit as it would be quicker to enter the orders your self manually. Unless you dont know how the pairings go, which somehow, I dont think thats the case.

I must be missing something in your request a script that will only match currencies to create a pair and place orders, can be done quicker manually.

Keit

matrixebiz:
Hello, I'm just looking for a script that will trade currency pairs for me based on what I tell it are the Strong currencies and the Weak currencies.

So for example the script will have all currencies typed into the code already like the 24 IBFX currencies I want to use, USDCAD, EURGBP, GBPCHF, NZDUSD, etc .....

Now what I would like is for when I add the script to my chart, there is an option for letting it know what currencies are the Strong ones and the weak ones, so lets say the strong ones are USD,GBP and the weak ones are CHF,CAD,EUR,NZD

So all the script now needs to do is check the currency pairs for matches and place the trades, so for example by my currencies I picked above the script would place;

BUY USDCAD

BUY GBPCHF

SELL EURGBP

SELL NZDUSD

BUYs of course on Strong Base currencies and SELLs on weak base currencies and of course do nothing with the currencies that would have two weaks or two strongs.

Thank you and good luck
 
cockeyedcowboy:
Matrix

will the script be a time loop?

will the currencies be past it by user inputs, seperate file, or from another indicator or script file.

will this script only open the orders? or wil it manage them and or close them?

Are you going to manage the orders after there placed? If thats the case then creating this limited use script would not be of any great benefit as it would be quicker to enter the orders your self manually. Unless you dont know how the pairings go, which somehow, I dont think thats the case.

I must be missing something in your request a script that will only match currencies to create a pair and place orders, can be done quicker manually.

Keit

No your not missing anything Sometimes there might be 15 possible order pairs and figuring out which ones they are and whether to Buy or Sell can take some time. The script wont do anything other than what you deduced at the end of you post Just place the orders, I have another EA on the chart that manages the orders.

I have a script that is supposed to do this already but does not work correctly and misses many orders.

Here are it's user inputs;

extern string StrengtheningBases = "EUR,JPY,NZD" ;

extern string WeakeningBases = "AUD,USD,GBP" ;

extern string Pairs = "AUDJPYm,AUDNZDm,AUDUSDm,CHFJPYm,EURAUDm,EURCADm,EURCHFm,EURGBPm,EURJPYm,EURUSDm,GBPCHFm,GBPJPYm,GBPUSDm,NZDJPYm,NZDUSDm,USDCADm,USDCHFm,USDJPYm,NZDUSDm,AUDCADm,AUDCHFm,EURNZDm,GBPNZDm,NZDCHFm,GBPCADm" ;

extern double Lots = 0.1 ;

see it doesn't do anything else but figure out Strong and Weak base currencies and place the orders accordingly to what it matches looking at all the currencies I've allowed it to use.

Thank you

 
matrixebiz:
No your not missing anything Sometimes there might be 15 possible order pairs and figuring out which ones they are and whether to Buy or Sell can take some time. The script wont do anything other than what you deduced at the end of you post Just place the orders, I have another EA on the chart that manages the orders.

I have a script that is supposed to do this already but does not work correctly and misses many orders.

Here are it's user inputs;

extern string StrengtheningBases = "EUR,JPY,NZD" ;

extern string WeakeningBases = "AUD,USD,GBP" ;

extern string Pairs = "AUDJPYm,AUDNZDm,AUDUSDm,CHFJPYm,EURAUDm,EURCADm,EURCHFm,EURGBPm,EURJPYm,EURUSDm,GBPCHFm,GBPJPYm,GBPUSDm,NZDJPYm,NZDUSDm,USDCADm,USDCHFm,USDJPYm,NZDUSDm,AUDCADm,AUDCHFm,EURNZDm,GBPNZDm,NZDCHFm,GBPCADm" ;

extern double Lots = 0.1 ;

see it doesn't do anything else but figure out Strong and Weak base currencies and place the orders accordingly to what it matches looking at all the currencies I've allowed it to use.

Thank you

one suggestion if someone does write you a script instead of imputing the pairs in a sting using an external variable use your symbol set file instead because if you imput a pair that is not active in your watch window at the time you try to place the order It will not go through as your script will not be able to retrive the current price data to be able to open that order. If you use the symbol set file it will contain all the symbols that have current price data to open the orders and you will not run into future errors were you be trying to figure out why orders didnot go in.

Keit

 
cockeyedcowboy:
one suggestion if someone does write you a script instead of imputing the pairs in a sting using an external variable use your symbol set file instead because if you imput a pair that is not active in your watch window at the time you try to place the order It will not go through as your script will not be able to retrive the current price data to be able to open that order. If you use the symbol set file it will contain all the symbols that have current price data to open the orders and you will not run into future errors were you be trying to figure out why orders didnot go in. Keit

It will if you do a MarketInfo(buySymbol,MODE_BID); I only need one currency pair on my chart and it will get the info from which ever currency pair I tell it to.

 

Maybe a script that lists all the pairs that you can quickly enter true/false on and then it only trades the true. But any such script has to have error checking/trade trapping so that it continually tries to open trades until they're all open -- otherwise you will get context busy errors.

 
robp:
Maybe a script that lists all the pairs that you can quickly enter true/false on and then it only trades the true. But any such script has to have error checking/trade trapping so that it continually tries to open trades until they're all open -- otherwise you will get context busy errors.

Correct, so most likely a "if(!IsTradeContextBusy() && IsTradeAllowed()) { BUY/SELL }" type of command would be necessary

Reason: