NexusFi: Find Your Edge


Home Menu

 





simple stratgy


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one musuk with 3 posts (0 thanks)
    2. looks_two cory with 1 posts (0 thanks)
    3. looks_3 vegasfoster with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 2,110 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

simple stratgy

  #1 (permalink)
 musuk 
uk, london
 
Experience: Beginner
Platform: Multicharts
Trading: forex
Posts: 27 since Sep 2011
Thanks Given: 6
Thanks Received: 2

hi every one

i want to build a signal that it buy when the current bar start counting the numbers of previose bars and if it higher then it will buy and same when it sale to close.
i think its easey but i have no idea how to do it.

thanks

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844


Are you saying that if you define your entry criteria as 8, then if the last 8 bars are up bars then it will buy at the open of the ninth bar? To let you know, I have analyzed the crap out of bar data and can tell you that over time there is a 50% chance that the next bar will be an up bar and a 50% chance it will be a down bar, regardless of how many of the previous bars were consecutively up or down, i.e. the probabilities are always the same as flipping a coin. To account for the overall change in price, there is a very small differential in the percentages and/or average size of the bars, but nothing that can be readily exploited after consideration of slippage and commissions.

That said, you can create this easily using the strategy wizard, just add a condition that Close > Open 1 bar ago, then add another condition for 2 bars ago, etc.

Reply With Quote
Thanked by:
  #4 (permalink)
 musuk 
uk, london
 
Experience: Beginner
Platform: Multicharts
Trading: forex
Posts: 27 since Sep 2011
Thanks Given: 6
Thanks Received: 2

thanks for ur reply

i know that its 50% win or loose but i just want to create an aidea in my head so if any one can just write it for me or just give some notes that will be nice

thanks

Started this thread Reply With Quote
  #5 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


musuk View Post
thanks for ur reply

i know that its 50% win or loose but i just want to create an aidea in my head so if any one can just write it for me or just give some notes that will be nice

thanks

check this out

Reply With Quote
  #6 (permalink)
 kzaorski 
Warsaw, Poland
 
Experience: Beginner
Platform: MultiCharts
Broker: IB, IQFeed
Trading: TF
Posts: 5 since Aug 2011
Thanks Given: 13
Thanks Received: 6


musuk View Post
hi every one

i want to build a signal that it buy when the current bar start counting the numbers of previose bars and if it higher then it will buy and same when it sale to close.
i think its easey but i have no idea how to do it.

thanks

Maybe try this:

 
Code
inputs: TP$(100), SL$(100), _BackBars(5);
variable: quantity(1), nBars(0);

For nBars = 0 to _BackBars begin
	if H[nBars] > H[nBars + 1] then begin
		condition1 = true;
	end	
	else begin
		condition1 = false;
	break;
	end;
end;
For nBars = 0 to _BackBars begin
	if H[nBars] < H[nBars + 1] then begin
		condition2 = true;
	end	
	else begin
		condition2 = false;
	break;
	end;
end;

if condition1 then begin
	Buy quantity contracts Next Bar At market;
end;

if condition2 then begin
	SellShort quantity contracts Next Bar At market;
end;		

setstopposition;
setprofittarget(TP$);
setstoploss(SL$);

Reply With Quote
Thanked by:
  #7 (permalink)
 musuk 
uk, london
 
Experience: Beginner
Platform: Multicharts
Trading: forex
Posts: 27 since Sep 2011
Thanks Given: 6
Thanks Received: 2

thanks for ur reply i will try this.

Started this thread Reply With Quote




Last Updated on January 1, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts