Welcome to the Traders Laboratory Forums.
Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Reply
Old 05-04-2009, 06:02 AM   #1

Join Date: May 2009
Location: Manchester
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

How to Write My Strategy Using (C++ or C#)

Hey everyone,

I've written a very basic strategy using IG Market's backtester builder. I'm trying to write something more sophisticated, but don't fully understand the language yet. So, if I give you a summary of my strategy would it be possible to give me the inputs? Once I know the basic coding I can then tweak the system

Statements I would like to include:

- If price is below moving average 50 then buy 2 lots in 4 bars time (if this bar's close is greater than the bar 4 time frames ago).

- If price is below moving average 50 then buy 2 lots when the price drops by 35 pips.



Thanks to anyone who can help, much appreciated.
High.demand.trader is offline  
Reply With Quote
Old 05-04-2009, 06:13 AM   #2

Join Date: May 2009
Location: Manchester
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: How to Write My Strategy Using (C++ or C#)

I think it is refered to as Easylanguage as well...
High.demand.trader is offline  
Reply With Quote
Old 05-04-2009, 07:53 AM   #3

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Write My Strategy Using (C++ or C#)

It would probably help to clarify exactly what platform you are writing for.

tradestation uses Easly Language. There are a variety that use C derivatives (Ninja for example).

If it's tradestation there is a good chance you will get help if you can lay things out clearly or show what you have already.
BlowFish is offline  
Reply With Quote
Old 05-04-2009, 08:15 AM   #4

Join Date: May 2009
Location: Manchester
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: How to Write My Strategy Using (C++ or C#)

I'm trying to write something in Easy Language (I think) on the IG Markets advanced chart facility. It has stuff like: IF CLOSE[0] < CLOSE[2] THEN BUY 10%CAPITAL AT MARKET ENDIF

I think that's easy language right? I'm writing it myself and also using predetermined values.

Thanks
High.demand.trader is offline  
Reply With Quote
Old 05-04-2009, 08:31 AM   #5

Join Date: May 2007
Location: Toronto
Posts: 262
Ignore this user

Thanks: 9
Thanked 149 Times in 54 Posts

Re: How to Write My Strategy Using (C++ or C#)

That is not Easylanguage. It is the IG MArkets version. Similar but different. The question is: What platform will you be using to executes the trades or at least, perform backtesting. If it is IG Markets, then you need to follow their format which is different than tradestation's Easylanguage.
bakrob99 is offline  
Reply With Quote
Old 05-04-2009, 08:41 AM   #6

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Write My Strategy Using (C++ or C#)

I'm not familiar with IG's platform chances are they have gone for some sort of easy language compatibility. Easy Language was produced by Omega Research and is fairly widely used. Chances are that IG have implement a fairly small subset. I should post what you have and what you are trying to do and see what you get.
BlowFish is offline  
Reply With Quote
Old 05-04-2009, 08:55 AM   #7

Join Date: May 2009
Location: Manchester
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: How to Write My Strategy Using (C++ or C#)

Thanks for help everyone. Yeah the backtester is through IG. So how would you say : sell at market when the price has dropped 35 points?

If I get a rough idea I can then try and feed this into the system.
High.demand.trader is offline  
Reply With Quote
Old 05-04-2009, 09:05 AM   #8

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Write My Strategy Using (C++ or C#)

Whilst I am pretty competent at EL the strategy stuff (buying and selling) I have not really used.

There are thousands of bits of code scattered round the inter web that you will probably be able to learn from. Tams also kindly posted some resources somewhere on Traders Lab.

something like

Var: StartingPrice(0);

if date > date [1] then StartingPrice = close;
if c <= StartingPrice-35 then ........buy stuff...

If the syntax of IG is different you might have to mess with stuff.
BlowFish is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with My First Strategy ptcman Coding Forum 25 10-08-2009 07:53 AM
Write to the Right (side) jojojo Coding Forum 8 05-01-2009 12:20 PM
Strategy for Es TWI Automated Trading 6 10-28-2008 02:18 PM
Simple fib Strategy feb2865 Technical Analysis 1 09-19-2007 06:59 PM
What is your strategy when a trade goes against you jperl Technical Analysis 15 05-22-2007 11:41 PM

All times are GMT -4. The time now is 10:38 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.