hi everyone
I need help about an idea of trading system based on these parameters
if at 12 o clock am Apple 'future is negative or just a bit positive not more 0.20% and at same time Amazone future is positive up 0.40% short apple .
that is all.
it is possible caalculate both in % or in points, it is same.
thanks for your help
something like spread
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: something like spread
Do you already have a piece of code we can continue the work from? That would make helping easier and quicker for us.
Re: something like spread
JOSH HI
NO i have nothing just this idea.
it is almost impossible to backtesting but I ve wathed the market for years and is a very profittable
strategy with 2 right instruments.
trust of me
NO i have nothing just this idea.
it is almost impossible to backtesting but I ve wathed the market for years and is a very profittable
strategy with 2 right instruments.
trust of me
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: something like spread
I don't care about profitable strategies, but I do think this is backtestable (or I must be overlooking something).
If you can make your instructions more explicit, they can probably be turned into code.
As an example, two things that I don't understand from your original post is what the future is (a single stock future?) and how you calculate the percentages.
If you can make your instructions more explicit, they can probably be turned into code.
As an example, two things that I don't understand from your original post is what the future is (a single stock future?) and how you calculate the percentages.
if at 12 o clock am Apple 'future is negative or just a bit positive not more 0.20% and at same time Amazone future is positive up 0.40% short apple
Re: something like spread
hii Josh tjhanks for your time,
the strategy is very simple maybe too much but never mind.
example :
start at 1400- in preopening to wall street
value of nasdaq and sp500.
if nasdaq 100 futures (at 1430 ) is up 0,40% and sp500 future is about around -0,10 % o less then short 3 contracts of sp500 and set 3 target as you want or 1 target .
but at 1700 close all .
pratically if the target are not reach close all at 1700 .
very simple to explain
I ve wrote sp500 nasdaq but could be other.
the logic is that sp 500 in the first 1.5 hours of open will be less strong of nasdaq , more or less.
the strategy is very simple maybe too much but never mind.
example :
start at 1400- in preopening to wall street
value of nasdaq and sp500.
if nasdaq 100 futures (at 1430 ) is up 0,40% and sp500 future is about around -0,10 % o less then short 3 contracts of sp500 and set 3 target as you want or 1 target .
but at 1700 close all .
pratically if the target are not reach close all at 1700 .
very simple to explain
I ve wrote sp500 nasdaq but could be other.
the logic is that sp 500 in the first 1.5 hours of open will be less strong of nasdaq , more or less.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: something like spread
The code below is a start. But I don't know how you calculate the percentages. So I can't complete that piece of the puzzle.
Code: Select all
// Data1: ES, Data2: NQ
Input:
Start_Time(1430),
NQ_Entry_Return(0.40),
ES_Entry_Return(-0.10);
Variables:
returnES(0), returnNQ(0),
tradeCondition(false);
// Look for trades at the specified start time
if time = Start_Time then begin
returnES = 0;
returnNQ = 0;
tradeCondition = returnNQ >= NQ_Entry_Return and
returnES >= ES_Entry_Return - 0.1 and
returnES <= ES_Entry_Return + 0.10;
if tradeCondition then begin
SellShort ("ES") 3 contracts next bar at market;
end;
end;
Re: something like spread
thanks Josh
but if we change percentage in points ?
give up on percentage ,maybe in points is possible?
I mean : if ES LOSE 2 POINTS AND ND GAIN 20 POINTS AT 1430 THEN SHORT 3 CONTRACTS OF ES.
another qestion: in pre build and in forum I have not found
code of trendline ,do you have got?
but if we change percentage in points ?
give up on percentage ,maybe in points is possible?
I mean : if ES LOSE 2 POINTS AND ND GAIN 20 POINTS AT 1430 THEN SHORT 3 CONTRACTS OF ES.
another qestion: in pre build and in forum I have not found
code of trendline ,do you have got?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: something like spread
Sure that is possible. But this has the same problem as the percentages. That is, to code a certain point loss or gain we'll need to know the comparison period.but if we change percentage in points ?
give up on percentage ,maybe in points is possible?
I mean : if ES LOSE 2 POINTS AND ND GAIN 20 POINTS AT 1430 THEN SHORT 3 CONTRACTS OF ES.
Are you measuring those point lost/gained relative to yesterday's close? Yesterday at 14:30? Yesterday's start of the Globex session? Or does the 14:30 bar need to have a loss of 2 points ES points?
I don't understand. There's a wiki page with the trend line keywords, if that helps.in pre build and in forum I have not found code of trendline ,do you have got?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: something like spread
Okay, with that information we can update the code a little further:
Is this still correct based on your idea?
Don't be afraid to jump in with your own code. That's the best way to learn.
Code: Select all
// Data1: ES, Data2: NQ
Input:
Start_Time(1430),
Close_Time(1700),
ES_Entry_Point_Filter(-2),
NQ_Entry_Point_Filter(20),
NQ_Entry_Return(0.40),
ES_Entry_Return(-0.10);
Variables:
returnES(0), returnNQ(0),
tradeCondition(false),
esClose(0), nqClose(0);
if time = Close_Time then begin
esClose = close data1;
nqClose = close data2;
end;
// Look for trades at the specified start time
if time = Start_Time then begin
returnES = close data1 - esClose;
returnNQ = close data2 - nqClose;
tradeCondition = returnES <= ES_Entry_Point_Filter and
returnNQ >= NQ_Entry_Point_Filter;
if tradeCondition then begin
SellShort ("ES") 3 contracts next bar at market;
end;
end;
Don't be afraid to jump in with your own code. That's the best way to learn.
Re: something like spread
hey Josh really thanks
I think just give a look at strategy it si more or less 90percent my idea.
2 things
when I say start entry at 14.30 it means that it is only chance to entry , I mean
if condition is at 15.00 I dont want entry at market.
maybe will be more efficiency say to strategy : open short if condition is good between time 13.45 to 14.45 , it means , if frame for instance is 5 minutes . when
there is condition between 1345-1445 entry open short. but after 1445 stop e go flat if condition there isnt.
I think just give a look at strategy it si more or less 90percent my idea.
2 things
when I say start entry at 14.30 it means that it is only chance to entry , I mean
if condition is at 15.00 I dont want entry at market.
maybe will be more efficiency say to strategy : open short if condition is good between time 13.45 to 14.45 , it means , if frame for instance is 5 minutes . when
there is condition between 1345-1445 entry open short. but after 1445 stop e go flat if condition there isnt.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: something like spread
I understood so from the original comments. It's in the code with this if statement:when I say start entry at 14.30 it means that it is only chance to entry , I mean
if condition is at 15.00 I dont want entry at market.
Code: Select all
if time = Start_Time then begin
I don't think I understand you here. Just a couple sentences ago you said that the strategy should really start at 14:30. But now it doesn't anymore? This is quite confusing!open short if condition is good between time 13.45 to 14.45 , it means , if frame for instance is 5 minutes . when
there is condition between 1345-1445 entry open short. but after 1445 stop e go flat if condition there isnt.
Re: something like spread
JOsh thanks ,without testing it I think the strategy is my idea.
about time: I SAID 1430 because usuallly it happens bettwen 1330 to 1530
but, of course it is not matematic .
i said 1430 just to give an input to you but the time exacly to openshort is not easy to decide,for sure is between 1330 and open ws 1530.
at the end of everything the best thing is to say at the strategy: open short between 1400-to 1530.
if is possible change strategy in this way is the best, otherwise never mind.
I HAVE TO ADD , THAT THIS EVENT HAPPENS NOT OFTEN AND so, is give more chance for an open short.
thanks
about time: I SAID 1430 because usuallly it happens bettwen 1330 to 1530
but, of course it is not matematic .
i said 1430 just to give an input to you but the time exacly to openshort is not easy to decide,for sure is between 1330 and open ws 1530.
at the end of everything the best thing is to say at the strategy: open short between 1400-to 1530.
if is possible change strategy in this way is the best, otherwise never mind.
I HAVE TO ADD , THAT THIS EVENT HAPPENS NOT OFTEN AND so, is give more chance for an open short.
thanks