to calculate drawdown double dCurrentMax arrBalance0; nTradeNumber 0; double nTradeNumberBuy 0; double nTradeNumberSell 0; double dOpenPrice; double dStop; double dTp 0; for(double nBar nRemoveFirst 1; nBar array_size(arrClose) - nRemoveFirst; nBar nBar 1) if(nType! Lets take a look at the code: forex_nn_04.tsc, forex trading strategie deutsch fragment array CreateNoc(double nInterval, double dMinRange) print srn "Creating NOC indicator array arrNormOnCondition create_array(0 array arrPeriodLow create_array(0 array arrPeriodHigh create_array(0 double nArraySize array_size(arrClose array arrPeriodLow mvmin(arrLow, nInterval array arrPeriodHigh mvmax(arrHigh, nInterval for(double i 0; i nInterval;. One of the brockers that is not hiding the fact they use MT, is Alpari. However, you cannot use its High, Low or Close, because you don't have them yet - the bar had just opened. It is a dangerous idea, however, as it is easy to overoptimize the system. Forex_nn_01.tsc, part 2 void TestNet print srn "Testing the NN / Array to hold the balance (total amount of money) / that we have after each trade. We have the script, implementing this NN without calls to the Cortex-specific NN functions. Now, divide the output (prediction) of the 100 accurate NN. Trades:.0f nTradeNumber, " (B:.0f nTradeNumberBuy, S:.0f nTradeNumberSell, Balance: f - 1, " (f - 1, f)rn - 1, "tI:.0f nInterval, Ma:.0f nMa, Out:.0f nOutLag, Stop:.4f dStopLoss, Tp:.4frn dTakeProfit, "tBuy:.3f dBuyLevel, Sell:.3f dSellLevel, Neurons:.0f nNeurons, Lags: srn strLagBuf / array CreateClv(double nInterval) print srn "Creating CLV. After the contest, leave the commented code / dLotSize GetLotSize if(dLot 0) dLotSize GetLotSize else dLotSize dLot * GetLotSize if(AccountFreeMargin dLotSize * dInitAmount AccountFreeMargin 500) return(nResult double dTp; if(dTakeProfit 0) dTp 0; else dTp Bid - dTakeProfit; for(int nTry 0; nTry 10; nTry) SaveComment rn".
Forex Neural Network Just Copy Our Trading!
Neural Network forex Trading by our forex Trading Software
If you want to do additional optimizations to your code or NN, I advise you to do a research in the Internet, to learn more about hidden problems of this approach. I would strongly advice against using trading systems with large drawdowns. If you use this approach, you can open and close positions using the last (current) bar's open. This is just an example. The next step is not really required, but it is something, that may be useful. The CLV indicator is confined to 0 - 1 interval (our version of CLV is so when the indicator crosses up the dBuyLevel (see code above I am buying, when it is crossing down the dSellLevel, I am selling. Let artificial intelligence discover the best trading signals! However, as it is very simple, I cannot be sure that someone haven't invented it before. And - if we already have Clv-128, do we need Clv-129? Note, that this Chart does not show any images, until all cycles are completed. In two words: do your own analysis.
It will also calculate drawdown, as a measure of robustness of our trading system. Trades: 27(Buy: 27, Sell :0) NocInterval: 12, Range:.004, Ma: 3 Lag: 2, Neurons: 5 Stop:.0200, Tp:.0000, Stop increase:.600000, Buy:.170, Sell:.900 Drawdown:.299 Profit: 6174.000000 (long: 6174.000000, short:.000000) The first thing that you will notice, is the fact, that. The difference is, that NN would normalize the data to the range from smallest value of a Learning Set, to the largest value, while we normalize to the max - min of a fixed length "sliding" window (nClvInterval). Still, how far can the price go in one hour?