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: 18076
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: 56
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: 18076
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: 56
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: 56
Joined: Sat Jul 22, 2017 7:27 am

Re: Conjure strategy

Postby conjure » Mon Feb 19, 2018 5:02 pm

Apprentice is it possible to modify my second strategy so i can open the trades (Buy and Sell)
in one account that supports hedging , so i can back test the strategy?

what i need is this.

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.

if the price goes down for 50 pips open a SELL position.
if the price moves up for 50 more pips open a second SELL position.etc
for every 50 pips open a new SELL position.

that means that if the price move 50 pip over the original price 1.23350 ,it will open a BUY position.Now if it moves 50 pip down from original price it will open SELL position.
The account must support hedging.

Close all positions when profit is above a specific percentage of balance.
conjure
 
Posts: 56
Joined: Sat Jul 22, 2017 7:27 am


Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 4 guests