[IntrabarOrderGeneration = false]
inputs: PositionBasis( false ), FloorAmt( 50 );
if PositionBasis then
SetStopPosition
else
SetStopShare ;
setbreakeven + 4 points ( FloorAmt ) ;
Trying to get this breakeven to set stop at 2 pips higher than my entry once triggered
Breakeven modifivation
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Breakeven modifivation
[IntrabarOrderGeneration = false]
inputs: PositionBasis( false ), FloorAmt( 50 );
if PositionBasis then
SetStopPosition
else
SetStopShare ;
setbreakeven + 4 points ( FloorAmt ) ;
Trying to get this breakeven to set stop at 2 pips higher than my entry once triggered
Please see post #5
viewtopic.php?f=1&t=49891
-
- Posts: 18
- Joined: 06 Jun 2016
Re: Breakeven modifivation
Code: Select all
[IntrabarOrderGeneration = false]
inputs: PositionBasis( false ), FloorAmt( 50 );
if PositionBasis then
SetStopPosition
else
SetStopShare ;
setbreakeven + 4 points ( FloorAmt ) ;
-
- Posts: 18
- Joined: 06 Jun 2016
Re: Breakeven modifivation
Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
i set breakeven to equal the entry price + 4 ticks im getting the following error message when compiling "syntax error, expecting 'bars'
line 15, column 23"
-
- Posts: 18
- Joined: 06 Jun 2016
Breakeven modifivation 2
Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
line 18, column 23}
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Breakeven modifivation 2
Go to your code...i am getting the following error message when compiling syntax error, {expecting 'bars'Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
line 18, column 23}
find out the location of the problem at "line 18, column 23".
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Breakeven modifivation
try this:
note the asterisk (*) between 4 and ticks.
var1= entryprice + 4 * Ticks ;
note the asterisk (*) between 4 and ticks.
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Breakeven modifivation 2
setbreakeven is a predefined function. And you have var1 = setbreakeven and var1 = entryprice + 4 ticks; So you are defining var1 two times and each time they are different.Go to your code...i am getting the following error message when compiling syntax error, {expecting 'bars'Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
line 18, column 23}
find out the location of "line 18, column 23".
As TJ notes, you can't say 4 ticks but 4 * ticksize and you have to define ticksize as ticksize (minmove/pricescale); where you declare variables. So you have a few things going on here.