Skip to main content

Posts

Showing posts from 2017

Selecting Indvidiual Custom Labels in Eclipse Force.com IDE

Workaround for managing individual custom labels in Eclipse Force.com IDEUnfortunately the Force.com IDE does not yet support individual custom label selection even though the UI does. There is a bug/issue filled so please upvote it at this link Selection of individual `CustomLabels` not working There is a workaround however. One must manually update the `package.xml` and specify the metadata member `CustomLabel` (no s at the end) and the individual labels like so. Also ensure you don't have the labels node selected through the Eclipse Force.com IDE UI, that is there should not be an entry in your `package.xml` for member `CustomLabels`. One annoying caveat of this is to edit `CustomeLabels.labels` you must be in offline ('Right click root project > Force.com > Work Offline') mode otherwise it get's still refreshed from the server. <types> <members>Label_1</members> <members>Label_2</members> <members&g…

MQL5 indicator artifacts issue

MQL5 indicator buffer random valuesDuring my coding of an indicator random values would end up in the index buffer if one would switch time frames. It took me a few hours to figure out that if I didn't explicitly set an empty value this would cause this to happen - so the solution is to always set a value during your OnCalculate() loop both for your empty bars and not. /* OnCalculate =========== Called only in custom indicators when it's necessary to calculate the indicator values by the Calculate event. */ int OnCalculate(const int iRatesTotal, const int iPreviousCalculated ,const datetime &time[] ,const double &aOpen[] ,const double &aHigh[] ,const double &aLow[] ,const double &aClose[] ,const long &tick_volume[] ,const long &volume[] ,const int &spread[]) { Print(">>> OnCalculate(): `iRatesTotal=" + iRatesTotal + "`, `iPreviousCalculated=" + iPreviousCalculated + "`"); //int iStart…

A review of my one month FOREX trading experience

In Charts and TablesMy first month trading FOREX trading is now complete and as expected (but definitely not wanted) my account balance has gone down 52%. I have done a total 115 trades which equates to about 28 trades per week.Trade History export to CSV MetaTrader must have been designed by geeks for geeks as there is no export to CSV/Excell. Fortunately I am such aforementioned geek and created a script for this purpose. On the bright side is I expected to start learning MQL at some point so this started that process. You can find my script at this link: MetaTrader Export Trade History to CSV.Lossing vs Winning Trades I did really great in the first week, perhaps it was luck perhaps it was new trader confidence. Looking back at the trades I seldom had a stop loss, had a generous stop loss in place, or kept adjusting it, and I recall leaving the trades alone then coming back to them seeing profits and just setting a trailing stop loss; I can possibly confirm this by looking how the or…

Least Correlated Forex Currency Pairs

Minimizing risk trough Un-correlationThe number of possible major/minor currency is large and trading currencies that are correlated logically increases risk. My Google search for least correlated Forex pairs came up empty so I decided to run the analysis myself. Using information from this list on Oanda I created a JS script that would loop through the table entires and return the least correlated pairs based on the 1 year value. Major Currencies Max correlation between -0.50 and 0.50. ["AUD/JPY", "AUD/USD", "EUR/AUD"] Major + Minor Currencies Max correlation between -0.60 and 0.60, with preference to try to keep major currencies in final set ["AUD/CAD", "AUD/CHF", "AUD/HKD", "AUD/JPY", "EUR/GBP", "EUR/SEK", "NZD/CAD", "SGD/CHF", "USD/SAR"] You may want to run the below snippet and adjust aPAIRS_TO_TRY_FIRST and nMAX_ABSOLUTE_CORRELATION with your own needs. Feel …