stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Basket EA Shell
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4633
Page 1 of 2
Author:  willmalou [ Tue Mar 01, 2016 2:57 am ]
Post subject:  Basket EA Shell

Is there a Basket EA shell anywhere?? I have been trying to use these from FF but it does not have any checks for multiple trades an such.
Author:  Radar [ Tue Mar 01, 2016 6:47 am ]
Post subject:  Basket EA Shell

Hey Willmalau,

Check out Steve's shells here, plenty to choose from ;)

Have fun!
Radar =8^)
Author:  willmalou [ Tue Mar 01, 2016 3:28 pm ]
Post subject:  Basket EA Shell

Radar » Mar 1st, '16, 02:47 wrote:Hey Willmalau,

Check out Steve's shells here, plenty to choose from ;)

Have fun!
Radar =8^)
Maybe I am asking the wrong thing. Can any EA run from an offline chart? Or does it have to be modified some?
Author:  milanese [ Tue Mar 01, 2016 3:31 pm ]
Post subject:  Basket EA Shell

willmalou » Tue Mar 01, 2016 3:28 pm wrote:
Maybe I am asking the wrong thing. Can any EA run from an offline chart? Or does it have to be modified some?
if the EA uses OnTimer() function yes if not it is possible that the EA must be modified...

Cheers :)

Tommaso
Author:  willmalou [ Tue Mar 01, 2016 5:46 pm ]
Post subject:  Basket EA Shell

milanese » Mar 1st, '16, 11:31 wrote:
willmalou » Tue Mar 01, 2016 3:28 pm wrote:
Maybe I am asking the wrong thing. Can any EA run from an offline chart? Or does it have to be modified some?
if the EA uses OnTimer() function yes if not it is possible that the EA must be modified...

Cheers :)

Tommaso
Looked at Steve's Bugger All shell, the OnTimer is not there. Would I have to put all the functions inside the OnTimer as they are in the EA above. I can modify just not good at writing yet. :smile: Thanks for your help.
Author:  milanese [ Tue Mar 01, 2016 5:52 pm ]
Post subject:  Basket EA Shell

willmalou » Tue Mar 01, 2016 5:46 pm wrote:
Looked at Steve's Bugger All shell, the OnTimer is not there. Would I have to put all the functions inside the OnTimer as they are in the EA above. I can modify just not good at writing yet. :smile: Thanks for your help.
Just add this

Code: Select all

int OnInit()
{

EventSetTimer(1) ;// calls OnTimer() every second



return(INIT_SUCCEEDED);
}

void OnTimer()
{

OnTick();
  

}
That should do the trick..

Cheers :)

Tommaso
Author:  Radar [ Tue Mar 01, 2016 6:26 pm ]
Post subject:  Basket EA Shell

Hey Willmalau,

Steve's shells can be used to create multi-pair EA's that work on a single, online chart, and have basket management features, so you don't really have to muck around with offline chart generators, etc...
Or, you can have an EA on multiple charts, with the same magic number, and use MPBM, (Multi-Purpose Basket Manager)...
Or, if you prefer offline charts, you can go with the T101 method, or Seller9's merged charts method...
There's so many different ways to do baskets, you're bound to find one that suits ;)

Have fun!
Radar =8^)
Author:  willmalou [ Tue Mar 01, 2016 8:25 pm ]
Post subject:  Basket EA Shell

milanese » Mar 1st, '16, 13:52 wrote: Just add this

Code: Select all

int OnInit()
{

EventSetTimer(1) ;// calls OnTimer() every second

return(INIT_SUCCEEDED);
}

void OnTimer()
{

OnTick();
  

}
That should do the trick..

Cheers :)

Tommaso
ok added the code, add logic to trade. When i put it on an offline chart the spread calc function is running even though i have it set to false. Attached to have you look at the code to make sure I have everything in the correct place. thanks again for all you help. Also attached a picture of the calc.
Author:  milanese [ Tue Mar 01, 2016 9:07 pm ]
Post subject:  Basket EA Shell

willmalou » Tue Mar 01, 2016 8:25 pm wrote:
ok added the code, add logic to trade. When i put it on an offline chart the spread calc function is running even though i have it set to false. Attached to have you look at the code to make sure I have everything in the correct place. thanks again for all you help. Also attached a picture of the calc.
the avergae spread will always be calculated but this is no problem.. as it has informative character..
if this disturbes you just cpmment this out, note it will be a way to get an EA coded, it is great learning coding, but maybe offlinechart trading EAs are not the best starting point..

Cheers :)

Tommaso
Author:  willmalou [ Wed Mar 02, 2016 3:30 pm ]
Post subject:  Basket EA Shell

milanese » Mar 1st, '16, 17:07 wrote: the avergae spread will always be calculated but this is no problem.. as it has informative character..
if this disturbes you just cpmment this out, note it will be a way to get an EA coded, it is great learning coding, but maybe offlinechart trading EAs are not the best starting point..

Cheers :)

Tommaso
Yes i commented out that function. My offline chart is made up of five currencies, do i have to put in code for the ea to order each one or should this ea be able to handle this. I have gotten and order send error 4106 unknown symbol error. I use FXCM so no added prefixes to the currency pairs.
All times are UTC Page 1 of 2