Total strategy

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Total strategy

Postby mangonel » Wed Mar 24, 2021 2:13 pm

Hello community ! Apprentice, do you have time for a new strategy ?

Please name the strategy Total

Price type : Bid,Ask
Time frame : m1,m5,m15,m30,H1,H2,H3,H4,H6,H8,D1,W1,M1
Allow strategy to trade : Yes,No
Allowed side : Buy,Sell,Both
Trade ammount in lots : 1,2,3,4,.....
Type of signal : Direct,Reverse
Entry execution type : Live,End of turn
Allow multiple : Yes,No
Position limit :0,1,2,3...(Zero for unlimited)
Close on opposite : Yes,No
Breakeven in pips :...-3,-2,-1,0,1,2,3...
Data Source : High,Low,Close,Open
Set stop : Yes,No
Stop pips :1,2,3,4....

Option1:High,Low,Close,Open,(H+L)/2,(O+C)/2
N:-1,-2,-3,-4,.....

Enter Long:
Option1>Previous(N)Option1

Close Long:
Option1<Previous(N)Option1

Open Short:
Option1<Previous(N)Option1

Close Short:
Option1>Previous(N)Option1

I give you an example

Enter Long:
Close>Previous(-1)Close

Close Long:
Close<Previous(-3)Low

Enter Short:
High<Previous(-2)Close

Close Short:
Open>Previous(-2)Close

Thank you in advance !
mangonel
 
Posts: 45
Joined: Thu Mar 17, 2016 4:16 pm

Re: Total strategy

Postby Apprentice » Wed Mar 24, 2021 2:53 pm

Your request is added to the development list.
Development reference 308.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Total strategy

Postby mangonel » Sun Mar 28, 2021 12:30 pm

Apprentice can you add a parameter at the algorithm parameters so i can choose among all the price types ?

The code is

Option1:close,high,low,open
N:-1,-2,-3,...

Enter Long:
Option1>Previous(N)Option1

Close Long:
Option1<Previous(N)Option1

Open Short:
Option1<Previous(N)Option1

Close Short:
Option1>Previous(N)Option1

With the curent algorithm i can choose close,high,low,open

For example

Enter Long:
close>Previous(N)close

Close Long:
close<Previous(N)close

Open Short:
close<Previous(N)close

Close Short:
close>Previous(N)close

the same for high,low and open.The code trade with the same price type
close previous close
high previous high
low previous low
open previous open

but it does not give me the capabilities to research among all the combinations

Enter Long:
[close,high,low,open]>Previous(N)[close,high,low,open]

Close Long:
[close,high,low,open]<Previous(N)[close,high,low,open]

Enter Short:
[close,high,low,open]<Previous(N)[close,high,low,open]

Close Short:
[close,high,low,open]>Previous(N)[close,high,low,open]

For example one combination is:

Enter Long:
Low>Previous(N)High

Close Long:
High<Previous(N)Open

Enter Short:
close<Previous(N)High

Close Short:
Open>Previous(N)Open

another combination :

Enter Long:
Low>Previous(N)High

Close Long:
Low<Previous(N)High

Enter Short:
Low<Previous(N)High

Close Short:
Low>Previous(N)High

Thank you for your time and your effort.
mangonel
 
Posts: 45
Joined: Thu Mar 17, 2016 4:16 pm

Re: Total strategy

Postby Apprentice » Tue Mar 30, 2021 6:14 am

Your request is added to the development list.
Development reference 325.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Total strategy

Postby mangonel » Sun Apr 04, 2021 11:01 am

Apprentice can you check my post again ? I post it at » Sun Mar 28, 2021 7:30 pm

the user chai88888 post this under my post :

Re: Total strategy
Post by chai88888 » Mon Mar 29, 2021 12:20 pm
what this error means?
C:/Program Files (x86)/Candleworks/FXTS2/Strategies/Custom/Total strategy.lua:267: Specified index is out of range
chai88888
and the request of the chai8888 take the same reference 325 as my post, you answer to the chai8888 and my request did not

please check again the reference 325 with my post and the relevant
Enter Long:
[close,high,low,open]>Previous(N)[close,high,low,open] etc etc
mangonel
 
Posts: 45
Joined: Thu Mar 17, 2016 4:16 pm

Re: Total strategy

Postby Apprentice » Tue Apr 20, 2021 4:22 pm

Your request is added to the development list.
Development reference 388.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Total strategy

Postby Apprentice » Fri Apr 23, 2021 3:48 am

Total_strategy.lua
(22.67 KiB) Downloaded 171 times

I can't repeat it. Added additional check just in case.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot] and 10 guests