Find Jobs
Hire Freelancers

amibroker code - repost

$30-250 USD

Completed
Posted over 10 years ago

$30-250 USD

Paid on delivery
I have decided to repost this project with a change in detail. I want a review and possible additions to my amibroker code. I have posted the code below for review. The code is defined for CFD trading on margin. margin in 10 percent in this case. Interest is paid on long open positions. x amount per day Position size is percentage risk (2 %) * equity/ 2 * atr(100) Buy Filter is fast moving average > slow moving average Buy Filter is the moving average 10 of Rate of change (63) > moving average 25 of Rate of change (63) Buy if todays close is higher or equal to the highest close in the past 50 days. The opposite is applied to a sell position. Close is trailing stop 3 * ATR(100). Note this is the same for short positions CODE: SetOption("InitialEquity", 50000); SetOption("MinShares", 50); SetOption("MarginRequirement", 10); SetPositionSize( 2, spsPercentOfEquity )/(2* ATR(100)); MAFAST = EMA( Close, 50 ); MASLOW = EMA( Close, 100 ); ROCma1 = MA (Close,10); ROCma2 = MA (Close,25); ROCmaF = ROC( ROCma1, 63 ) ; ROCmaS = ROC( ROCma2, 63 ) ; HighestValue = HHV(C,50); LowestValue = LLV(C,50); Buy = C >= HighestValue AND MAFAST > MASLOW AND ROCmaF > ROCmaS ; Short = C stop[ i - 1] ) { temp = Close[ i ] - myATR[ i ]; if ( temp > stop[ i - 1 ] ) stop[ i ] = temp; else stop[ i ] = stop[ i - 1 ]; } else stop[ i ] = initial[ i ]; } Plot( stop, "ATR Stop", colorRed, styleLine ); Sell = C < Ref( stop, -1 ); Buy = ExRem (Buy, Sell); Sell = ExRem (Sell, Buy ); PlotShapes( IIf( stop < Ref( stop, -1 ), shapeDownArrow, Null ), colorOrange, 0, H ); Plot(HighestValue, "High", colorGreen, styleLine, 0,0,0,0);
Project ID: 5102643

About the project

5 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
hello, I'm a veteran programmer of amibroker afls, mt4, etc. with 100% completion rate. I'll give you complete working code based on your requirement in a day or two maximum. you can check my ratings. should you have any queries pls revert back. thanks sudris
$140 USD in 3 days
0.0 (0 reviews)
0.0
0.0
5 freelancers are bidding on average $235 USD for this job
User Avatar
We already work together hope u remember us . I did similar to this project here in Freelancer.com and the U was very happy with my work. I m available now to accept new project and i can start immediately. If u agree to work with us I can forward these details to my developer
$363 USD in 7 days
4.5 (37 reviews)
5.6
5.6
User Avatar
A proposal has not yet been provided
$147 USD in 3 days
5.0 (2 reviews)
3.1
3.1
User Avatar
Hi, I have Analyzed your project and code. First I will put few suggestions and then review on your posted code. There will be more but I point out few important. 1 . Equity, position size etc are defined in the afl itself. Commission is omitted there, sure it can be defined manually from the Analysis window, but it is required to get a realistic back test results. 2. Standard position sizing uses the current(intraday) equity value. If the code is run on EOD data, it may be ok, but depending on the clearing mechanism it should be previous days equity or in accordance with proper settlement delay if there is settlement delay. 3. For position sizing ATR is used which is dynamic in nature. In my experience I found it better to use Maximum value of ATR over x bars/days is more robust because, we are taking the maximum volatility over x periods. 4. "Buy Filter is the moving average 10 of Rate of change (63) > moving average 25 of Rate of change (63)." - The rule implemented in code is rate of change (63) of moving average (10). 5. The line "Short = C stop[ i - 1] )" is not correct. Syntax error and logical error in implementing short trade rule which is opposite of buy trade rule. And the loop following this line also contains errors, variable initialization/declaration. (I think you did not posted the full code, omitted some part). 6. The exit rule is not defined, but from code I assume it is when the trailing stop is hit on a close basis. Thanking You Joy Sebastian
$250 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello, I can assist you in this project. but I am no so sure we could implement Interest paid on long positions without resorting to CBT The Backtester setting Annual Rate applies interest on free funds in the account. Best Regards, Aron.
$277 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Geelong West, Australia
5.0
3
Payment method verified
Member since Feb 26, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.