Conjure strategy

Strategies are published here.

Moderator: admin

Conjure strategy

Postby Apprentice » Sun Jan 28, 2018 9:04 am

EURUSD m1 (01-28-2018 1315).png


Lets say EUR/USD is on 1.23350
if the price goes up for 50 pips open a BUY position.
if the price moves up for 50 more pips open a second BUY position.
etc
for every 50 pips open a new BUY position.

The secret is to be able to have 2 accounts.
1 for buy
1 for sell

Close all positions when used margin reach balance,
or when no more positions are able to open because of used margin.

conjure strategy.lua
(4.65 KiB) Downloaded 27 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 18073
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Conjure strategy

Postby conjure » Wed Feb 07, 2018 10:12 am

Apprentice Is it possible to add an option , to close all positions when profit is above a specific percentage of balance? Like this strategy bellow?
http://fxcodebase.com/code/viewtopic.php?f=31&t=2901&start=80#p114560
conjure
 
Posts: 55
Joined: Sat Jul 22, 2017 7:27 am

Re: Conjure strategy

Postby Apprentice » Mon Feb 12, 2018 11:27 am

conjure strategy.lua
(9.07 KiB) Downloaded 8 times

Try this version.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 18073
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Conjure strategy

Postby conjure » Mon Feb 12, 2018 2:07 pm

I really like it.
Thank you for your effort my friend..

Can i ask you one last thing?

Can you add an option to open both positions (Buy and Sell)
when parameters (+10 pip) meet ,
so i don't have to load it twice for every pair?

something like that
Code: Select all
    strategy.parameters:addBoolean("is_sell", "Is Sell", "", true);
    strategy.parameters:addBoolean("is_buy", "Is Buy", "", true);
conjure
 
Posts: 55
Joined: Sat Jul 22, 2017 7:27 am

Re: Conjure strategy

Postby conjure » Mon Feb 12, 2018 2:08 pm

I really like it.
Thank you for your effort my friend..

Can i ask you one last thing?

Can you add an option to open both positions (Buy and Sell)
when parameters (+10 pip) meet ,
so i don't have to load it twice for every pair?

something like that
Code: Select all
    strategy.parameters:addBoolean("is_sell", "Is Sell", "", true);
    strategy.parameters:addBoolean("is_buy", "Is Buy", "", true);
conjure
 
Posts: 55
Joined: Sat Jul 22, 2017 7:27 am


Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 2 guests