Spread Trading in Avatrader

Posted By JonnyCor Tuesday, November 20, 2012
Add to Favorites1
Author Message
JonnyCor
 Posted Tuesday, November 20, 2012
Supreme Being

Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)Supreme Being - (370 reputation)

Group: Forum Members
Last Active: Tuesday, November 20, 2012
Posts: 1, Visits: 8
370
Hi experts,

I need help about a question. I'd like to try spread strategy using Avatrader platform.

I need to have two cross in the same graph (EURUSD & GBPUSD) and and indicator for Standard Deviation betwen this two cross.

I stopped at first step! How can I have a graph with two cross ? Is possible tu create a SD indicator that read data from two different cross?

Thanks for answers,

Jonny Cortonicchi
black
 Posted Tuesday, November 20, 2012
Supreme Being

Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)Supreme Being - (96,525 reputation)

Group: Forum Members
Last Active: Sunday, July 13, 2014
Posts: 520, Visits: 1,004
JonnyCor (11/20/2012)
Hi experts,

I need help about a question. I'd like to try spread strategy using Avatrader platform.

I need to have two cross in the same graph (EURUSD & GBPUSD) and and indicator for Standard Deviation betwen this two cross.

I stopped at first step! How can I have a graph with two cross ? Is possible tu create a SD indicator that read data from two different cross?

Thanks for answers,

Jonny Cortonicchi


You can do this in a Strategy. There probably is no easy way to do it in an Indicator. This means that you will be able to get the results in Strategy form. You will be able to run the Strategy in the Tester. You will be able to run the Strategy in a Demo. You will be able to run the Strategy Live, and make or lose money. But you will not be able to see the lines in a graph or chart.

To do it, you will need to familiarize yourself with several things.

You will need to understand the basics of ActTrader Strategy scripting. This is not very difficult.

You will also need to adapt the formula for the SD from the ActForex Indicators found in your computer at C:\Documents and Settings\Owner\Application Data\Avatrader\LATEST.WORKING.UPDATE\resource\act_scripts\indicators\Standard Deviation.acti. The location in your computer will be slightly different.

You will need to have personal programming logic so that you will understand how to adapt the SD to two different currency pairs.

You will need two histories in the Strategy, such as:
var
History1, History2: TCandleHistory;

procedure OnCreate;
begin
AddCandleHistorySetting(@History1, 'History1', 'EURUSD', CI_4_Hours, 200);
History1.OnNewCandleEvent := @OnNewCandle;
AddCandleHistorySetting(@History2, 'History2', 'GBPUSD', CI_4_Hours, 200);

You will need to know how to combine History1.Last(N).Close with History2.Last(N).Close to use in the SD calculations.

Doing this might be fun. It would be a little bit of a challenge. But it isn't that hard to do, really. Again, you won't be able to view the lines on a graph or chart without some heavy duty programming. But you will be able to run the Strategy and get the results as though you were creating lines on a graph or chart.

Good luck on it.

If you figure out an easy way to view the lines on a graph or chart, please post the method.

Smile

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top