stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Need help for building a history file .
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3582
Page 3 of 3
Author:  juniorlcq93 [ Sun Apr 27, 2014 3:38 pm ]
Post subject:  Need help for building a history file .

milanese » Sun Apr 27, 2014 10:48 pm wrote:
juniorlcq93 » Sun Apr 27, 2014 1:12 pm wrote:
so can I say tick volume is actually my Total Volume ??
Spread = difference from bid and ask price ?? Means it is not 0 Integer then ??? I had to use MarketInfo to get bid and ask price minus ?
for spread you can use this:

Code: Select all

 spread=MarketInfo(Symbol(),MODE_SPREAD);
Cheers :)

Tommaso

What about the real volume ???? I checked and it says iVolume returns tick volume value from the specific bars ...
Author:  milanese [ Sun Apr 27, 2014 3:50 pm ]
Post subject:  Need help for building a history file .

juniorlcq93 » Sun Apr 27, 2014 3:38 pm wrote:
What about the real volume ???? I checked and it says iVolume returns tick volume value from the specific bars ...
Empty4 counts only ticks, there are no real volume data, it is always a tick count..

Cheers :)

Tommaso
Author:  juniorlcq93 [ Sun Apr 27, 2014 3:58 pm ]
Post subject:  Need help for building a history file .

So can I leave real volume as 0 then ???


Also about the MODE_SPREAD , I make TotalSpread as an Integer type , then below the 2nd for loop its TotalSpread += MarketInfo ( List[y] , MODE_SPREAD ) ;

And below I use FileWriteInteger ( Data , TotalSpread , INT_VALUE ) .

There's an error in the TotalSpread += ( possible loss of data due to type of conversion ) .


I read about MODE_SPREAD it seems to give back the value of spread in terms of points , which would be a Double type . When I tried making it into a double type then everything goes wrong , my chart will look like this .


Screen Shot 04-27-14 at 11.57 PM.PNG
Author:  milanese [ Sun Apr 27, 2014 4:05 pm ]
Post subject:  Need help for building a history file .

juniorlcq93 » Sun Apr 27, 2014 3:58 pm wrote:So can I leave real volume as 0 then ???

Also about the MODE_SPREAD , I make TotalSpread as an Integer type , then below the 2nd for loop its TotalSpread += MarketInfo ( List[y] , MODE_SPREAD ) ;

And below I use FileWriteInteger ( Data , TotalSpread , INT_VALUE ) .

There's an error in the TotalSpread += ( possible loss of data due to type of conversion ) .

I read about MODE_SPREAD it seems to give back the value of spread in terms of points , which would be a Double type . When I tried making it into a double type then everything goes wrong , my chart will look like this .
it is integer as points are always integer.. pips could be double

Cheers :)

Tommaso
Author:  juniorlcq93 [ Sun Apr 27, 2014 4:07 pm ]
Post subject:  Need help for building a history file .

milanese » Mon Apr 28, 2014 12:05 am wrote:
juniorlcq93 » Sun Apr 27, 2014 3:58 pm wrote:So can I leave real volume as 0 then ???

Also about the MODE_SPREAD , I make TotalSpread as an Integer type , then below the 2nd for loop its TotalSpread += MarketInfo ( List[y] , MODE_SPREAD ) ;

And below I use FileWriteInteger ( Data , TotalSpread , INT_VALUE ) .

There's an error in the TotalSpread += ( possible loss of data due to type of conversion ) .

I read about MODE_SPREAD it seems to give back the value of spread in terms of points , which would be a Double type . When I tried making it into a double type then everything goes wrong , my chart will look like this .
it is integer as points are always integer.. pips could be double

Cheers :)

Tommaso





Okay I get it now , points are 1/10 of a pip . I shall test the EA tomorrow and see whether the offline charts will move like a online chart a not . Is it possible to convert this into an indicator ?? ( So I just need 1 open chart and can create my offline charts ) . I don't think so I need to use the OnCalculate() as I already use the OnTimer() , I tried putting the ex4 into Indicators folder but it keeps on remove itself .
Screen Shot 04-28-14 at 12.27 AM.PNG
Author:  milanese [ Mon Apr 28, 2014 8:56 am ]
Post subject:  Need help for building a history file .

juniorlcq93 » Sun Apr 27, 2014 4:07 pm wrote:
Okay I get it now , points are 1/10 of a pip . I shall test the EA tomorrow and see whether the offline charts will move like a online chart a not . Is it possible to convert this into an indicator ?? ( So I just need 1 open chart and can create my offline charts ) . I don't think so I need to use the OnCalculate() as I already use the OnTimer() , I tried putting the ex4 into Indicators folder but it keeps on remove itself .
you should rewrite it as indicator with OnCalculate() ecc, with the same code you use for the EA it can't work..

Cheers :)

Tommaso
All times are UTC Page 3 of 3