help with code reference...

#1
trying to refer and change an array earlier in the code if condition is met

for ex:
period=50;

period is used in code for the next few lines

then

buyprice=...

trying to use the buyprice to adjust the period
for example, IIf( buyprice>X, period-10,period)

any ideas
 
#6
trying to refer and change an array earlier in the code if condition is met

for ex:
period=50;

period is used in code for the next few lines

then

buyprice=...

trying to use the buyprice to adjust the period
for example,

any ideas

y = IIf( buyprice > X, ref(period,-10),period);
 
#8
As far as AFL machine logic is concerned, the following is okay:

period=50;

//period is used in code for the next few lines

//then

//BuyPrice = x

x = 10;
//trying to use the BuyPrice to adjust the period
//for example,

y = IIf( X > 10, Ref(period,-10),period);

However, you need to describe your goal in words more precise for us to offer any good help.
 
#9
As far as AFL machine logic is concerned, the following is okay:

period=50;

//period is used in code for the next few lines

//then

//BuyPrice = x

x = 10;
//trying to use the BuyPrice to adjust the period
//for example,

y = IIf( X > 10, Ref(period,-10),period);

However, you need to describe your goal in words more precise for us to offer any good help.
haha
i was in a hurry when i jumbled together my first post
i will provide a more detailed description of my needs

thanks in advance mavrik
 

Similar threads